Hadithcore
Riyad as-Salihin, 80

Al-Bara' bin 'Azib (May Allah be pleased with them) said:

Messenger of Allah (ﷺ) asked me to recite whenever I go to bed: "Allahumma aslamtu nafsi ilaika, wa wajjahtu wajhi ilaika, wa fawwadtu amri ilaika, wal-ja'tu zahri ilaika, raghbatan wa rahbatan ilaika, la malja wa la manja minka illa ilaika. Amantu bikitabikal-ladhi anzalta, wa nabiyyikal-ladhi arsalta (O Allah! I have submitted myself to You, I have turned my face to You, entrusted my affairs to You; and committed my back to You out of desire for You and fear of You; expecting Your reward and fearing Your punishment). There is no refuge and no place of safety from You but with You. I believe in the Book You have revealed and in the Prophet (ﷺ) You have sent." Messenger of Allah (ﷺ) said that if anyone recited these words and died that night, he would die in the true religion. In case he remains alive till morning, he will obtain good. <b>[Al-Bukhari and Muslim]</b>. In another narration: He reported Messenger of Allah (ﷺ) as saying: "If you go to bed, perform the Salat Wudu', lie down on your right side and say <b>[the above Du'a (supplication)]</b> and let these words be your last".

السابع‏:‏ عن أبي عمارة البراء بن عازب رضي الله عنهما قال ‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏

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

‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏ ‏.‏

References1 variant
In-Book Reference
Introduction, Hadith 80
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) One of the traits of genuine believers is their resort to Allah Almighty in all their affairs.<br> 2) It guides to the renewal of one’s promise to Allah, Glorified and Exalted, every night, and to solidify faith in word and deed.<br> 3) It is recommended to sleep while ritually pure and to say those words last before sleeping.
Related hadiths12
Compare isnād across 12 related chains →