كتاب الذكر والدعاء والتوبة والاستغفار
48
The Book Pertaining to the Remembrance of Allah, Supplication, Repentance and Seeking Forgiveness
(17)
Chapter: Supplication When Going To Sleep
(17)
باب مَا يَقُولُ عِنْدَ النَّوْمِ وَأَخْذِ الْمَضْجَعِ

Al-Bara' b. 'Azib reported that Allah's, Messenger (may peace be upon said:

When you go to bed, perform ablution as is done for prayer; then lie down pn the right side and recite:" O Allah, I turn my face towards Thee and entrust my affair to Thee. I retreat unto Thee for protection with hope in Thee and fear of Thee. There is no resort and no deliverer (from hardship) but Thou only. I affirm my faith in Thine books which Thou revealed and in Thine Apostles whom Thou sent." Make this as the last word of yours (when you go to sleep) and in case you die during that night, you would die upon Fitra (upon Islam). And as I repeated these words in order to commit them to memory, I said:" I affirm my faith in Thy Messenger (Rasul) whom Thou sent." He said: Say:" I affirm my faith in the Apostle (Nabi) whom Thou sent."
حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، - وَاللَّفْظُ لِعُثْمَانَ - قَالَ إِسْحَاقُ أَخْبَرَنَا وَقَالَ، عُثْمَانُ حَدَّثَنَا جَرِيرٌ، عَنْ مَنْصُورٍ، عَنْ سَعْدِ بْنِ عُبَيْدَةَ، حَدَّثَنِي الْبَرَاءُ بْنُ عَازِبٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ إِذَا أَخَذْتَ مَضْجَعَكَ فَتَوَضَّأْ وُضُوءَكَ لِلصَّلاَةِ ثُمَّ اضْطَجِعْ عَلَى شِقِّكَ الأَيْمَنِ ثُمَّ قُلِ اللَّهُمَّ إِنِّي أَسْلَمْتُ وَجْهِي إِلَيْكَ وَفَوَّضْتُ أَمْرِي إِلَيْكَ وَأَلْجَأْتُ ظَهْرِي إِلَيْكَ رَغْبَةً وَرَهْبَةً إِلَيْكَ لاَ مَلْجَأَ وَلاَ مَنْجَا مِنْكَ إِلاَّ إِلَيْكَ آمَنْتُ بِكِتَابِكَ الَّذِي أَنْزَلْتَ وَبِنَبِيِّكَ الَّذِي أَرْسَلْتَ وَاجْعَلْهُنَّ مِنْ آخِرِ كَلاَمِكَ فَإِنْ مُتَّ مِنْ لَيْلَتِكَ مُتَّ وَأَنْتَ عَلَى الْفِطْرَةِ ‏"‏ ‏.‏ قَالَ فَرَدَّدْتُهُنَّ لأَسْتَذْكِرَهُنَّ فَقُلْتُ آمَنْتُ بِرَسُولِكَ الَّذِي أَرْسَلْتَ قَالَ ‏"‏ قُلْ آمَنْتُ بِنَبِيِّكَ الَّذِي أَرْسَلْتَ ‏"‏ ‏.‏
Reference : Sahih Muslim 2710 a
In-book reference : Book 48, Hadith 75
USC-MSA web (English) reference : Book 35, Hadith 6544
  (deprecated numbering scheme)