Narrated Al-Bara bin Azib: The Prophet, peace be upon him, said to me, “Whenever you go to bed perform ablution like that for the Salat, lie on your right side and say.
“Allahumma inni aslamtu wajhi ilaika, wa fawwadtu amri ‘ilaika, wa alja’tu, zahri ilaika raghbatan wa rahbatan ilaika. La malja wa la manja minka illa ilaika. Allahumma amantu bikitabikal-ladhi anzalta wa bi na-biyikal ladhi arsalta.
(O Allah! I Surrender to You and entrust You and entrust all my affairs to You. There is no fleeing from You, and there is no place of protection and safety except with You. O Allah! I believe in Your Book which, You have revealed, and in Your Prophet whom you have sent.)
Then if you die on that very night, you will die with faith. Let the afore-said words be your last utterance [before sleep].” I repeated it before the Prophet, peace be upon him, and when I reached “Allahumma amantu bikitabikal-ladhi anzalta (O Allah I believe in Your Book which You have revealed),” I said, “Wa Rasulika (and your Messenger).” The Prophet, peace be upon him, said, “No, but say Wa na-biyikal ladhi arsalta (O Allah I believe in Your Prophet whom You have sent).” I said, “Wa Rasulika (and Your Messenger.) The Prophet said, “No, (but say): Wa na-biyikal ladhi arsalta (Your Prophet whom You have sent), instead.”
[I: 247 O.B. Sahih Al-Bukhari)