Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) said: Shall I not teach you the words which the Messenger of Allah (peace and blessings be upon him) used to teach Abu Bakr (may Allah be pleased with him) for when he went to sleep? We said: Certainly. He said: "O Allah, Originator of the heavens and the earth, Knower of the unseen and the seen, You are the Lord of everything and its Sovereign. I bear witness that there is none worthy of worship except You, alone, without partner, and the angels bear witness to this. O Allah, I seek refuge in You from Satan and his shirk, and I seek refuge in You from bringing any evil upon myself or passing it on to any Muslim."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13649