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 You and entrust my affair to You. I retreat unto You for protection with hope in You and fear of You. There is no resort and no deliverer (from hardship) but You only. I affirm my faith in Your books which You revealed and in Your Messengers whom You 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 Your Messenger (Rasul) whom You sent." He said: Say:" I affirm my faith in the Messenger (Nabi) whom You sent."
حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، - وَاللَّفْظُ لِعُثْمَانَ - قَالَ إِسْحَاقُ أَخْبَرَنَا وَقَالَ، عُثْمَانُ حَدَّثَنَا جَرِيرٌ، عَنْ مَنْصُورٍ، عَنْ سَعْدِ بْنِ عُبَيْدَةَ، حَدَّثَنِي الْبَرَاءُ بْنُ عَازِبٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِذَا أَخَذْتَ مَضْجَعَكَ فَتَوَضَّأْ وُضُوءَكَ لِلصَّلاَةِ ثُمَّ اضْطَجِعْ عَلَى شِقِّكَ الأَيْمَنِ ثُمَّ قُلِ اللَّهُمَّ إِنِّي أَسْلَمْتُ وَجْهِي إِلَيْكَ وَفَوَّضْتُ أَمْرِي إِلَيْكَ وَأَلْجَأْتُ ظَهْرِي إِلَيْكَ رَغْبَةً وَرَهْبَةً إِلَيْكَ لاَ مَلْجَأَ وَلاَ مَنْجَا مِنْكَ إِلاَّ إِلَيْكَ آمَنْتُ بِكِتَابِكَ الَّذِي أَنْزَلْتَ وَبِنَبِيِّكَ الَّذِي أَرْسَلْتَ وَاجْعَلْهُنَّ مِنْ آخِرِ كَلاَمِكَ فَإِنْ مُتَّ مِنْ لَيْلَتِكَ مُتَّ وَأَنْتَ عَلَى الْفِطْرَةِ " . قَالَ فَرَدَّدْتُهُنَّ لأَسْتَذْكِرَهُنَّ فَقُلْتُ آمَنْتُ بِرَسُولِكَ الَّذِي أَرْسَلْتَ قَالَ " قُلْ آمَنْتُ بِنَبِيِّكَ الَّذِي أَرْسَلْتَ " .