The Messenger of Allah ﷺ said to me, "When you go to your bed, perform ablution as you would for prayer, then lie down on your right side and say, 'O Allah, I have submitted myself to You, entrusted my affair to You, and turned my back to You in hope and fear of You. There is no refuge or escape from You except to You. I have believed in Your Book which You revealed and in Your Prophet whom You sent. If I die, I die upon the fitrah.' Make these the last words you speak."I said, repeating them back to memorize, "And in Your Messenger whom You sent."He said, "No. 'And in Your Prophet whom You sent.'"In another narration he added, "And if he wakes in the morning, he attains good."In another narration, after the words "I have submitted myself to You," there is the addition, "And I have turned my face toward You."
قال لي رسول الله ﷺ: إذا أتيت مضجعك، فتوضأ وضوءك للصلاة، ثم اضطجع على شقك الأيمن وقل: اللهم أسلمت نفسي إليك، وفوضت أمري إليك، وألجأت ظهري إليك رهبة ورغبة إليك، لا ملجأ ولا منجا منك إلا إليك، آمنت بكتابك الذي أنزلت، وبنبيك الذي أرسلت، فإن مت مت على الفطرة فاجعلهن آخر ما تقول. فقلت: أستذكرهن وبرسولك الذي أرسلت. قال: لا وبنبيك الذي أرسلت. وزاد في رواية: وإن أصبح أصاب خيرا. وفي رواية بعد قوله: أسلمت نفسي إليك زيادة: ووجهت وجهي إليك.
Bukhari narrated it in the Book of Supplications (6311), and Muslim in the Book of Remembrance and Supplication (2710), both through the route of Mansur, from Saad bin Ubayda, who said, Bara bin Azib narrated it to me, and he related it.The first addition is from Muslim's route through Husayn (that is, Ibn Abdul-Rahman Sulami), from Saad bin Ubayda, with the same chain.The second addition is from Muslim's route through Amr bin Mura, from Saad bin Ubayda, with the same chain.Bukhari also narrated it (6313) through the route of Abu Ishaq, from Bara, and Muslim narrated it (2710) through the route of Abu Ishaq with the same chain, except that he did not relate its wording in full, but instead referred back to the narration of Amr bin Mura.