Narrated Abu Dhar:
Whenever the Prophet (ﷺ) lay on his bed, he used to say: "Allahumma bismika amutu wa ahya," and when he woke up he would say: "Al-hamdu lil-lahilladhi ahyana ba'da ma an atana, wa ilaihi an-nushur."
Narrated Abu Huraira:
The Prophet (ﷺ) said, "When anyone of you goes to bed, he should dust it off thrice with the edge of his garment, and say: Bismika Rabbi Wada`tu janbi, wa bika arfa'hu. In amsakta nafsi faghfir laha, wa in arsaltaha fahfazha bima tahfaz bihi 'ibadaka-s-salihin."
Narrated Abu Huraira:
The Prophet (ﷺ) said, "When anyone of you go to bed, he should shake out his bed with the inside of his waist sheet, for he does not know what has come on to it after him, and then he should say: 'Bismika Rabbi Wada`tu Janbi wa bika arfa'uhu, In amsakta nafsi farhamha wa in arsaltaha fahfazha bima tahfazu bihi ibadakas-salihin."
Narrated Al-Bara' bin `Azib:
When Allah's Messenger (ﷺ) went to bed, he used to sleep on his right side and then say, "All-ahumma aslamtu nafsi ilaika, wa wajjahtu wajhi ilaika, wa fauwadtu `Amri ilaika, wa alja'tu zahri ilaika, raghbatan wa rahbatan ilaika. La Malja'a wa la manja minka illa ilaika. Amantu bikitabika al-ladhi anzalta wa nabiyyika al-ladhi arsalta! Allah's Messenger (ﷺ) said, "Whoever recites these words (before going to bed) and dies the same night, he will die on the Islamic religion (as a Muslim).