Bara bin Azib reported,

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."

Azami 11232

Sahih

عن البراء بن عازب قال

قال لي رسول الله ﷺ: إذا أتيت مضجعك، فتوضأ وضوءك للصلاة، ثم اضطجع على شقك الأيمن وقل: اللهم أسلمت نفسي إليك، وفوضت أمري إليك، وألجأت ظهري إليك رهبة ورغبة إليك، لا ملجأ ولا منجا منك إلا إليك، آمنت بكتابك الذي أنزلت، وبنبيك الذي أرسلت، فإن مت مت على الفطرة فاجعلهن آخر ما تقول. فقلت: أستذكرهن وبرسولك الذي أرسلت. قال: لا وبنبيك الذي أرسلت. وزاد في رواية: وإن أصبح أصاب خيرا. وفي رواية بعد قوله: أسلمت نفسي إليك زيادة: ووجهت وجهي إليك.

الأعظمي 11232صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Morning and evening supplications
Section
Supplications and remembrances narrated when going to sleep and when waking up
Numbering
Jami al-Kamil 11232 (2nd edition)
Azami 11232