What to recite before going to bed
Al-Bara’ bin ‘Azib (radi Allahu anhu) said The Messenger of Allah (sal Allahu alaihi wa sallam) 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.” The Messenger of Allah (sal Allahu alaihi wa sallam) 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.
[Sahih al-Bukhari and Muslim]
In another narration: He reported the Messenger of Allah (sal Allahu alaihi wa sallam) as saying: “If you go to bed, perform the Salat Wudu’, lie down on your right side and say [the above Du’a] and let these words be your last”
It is better to make Wudu’ before going to sleep. Similarly, it is also meritorious to recite the invocation mentioned in the Hadith before one goes to bed, because it is a prayer for the renewal of Islam and Faith and request for grant of peace and security.
And Allah Knows Best!