Jami` at-Tirmidhi, Book 48, Hadith 32 (In-Book)

Abu Hurairah (ra) narrated that : the Messenger of Allah said: “When one of you leaves his bed then returns to it, then let him brush it off with the edge of his Izar three times, for indeed, he does not know what succeeded him upon it after him. When he lies down, let him say: ‘In Your Name, my Lord, I lay my side down, and in Your Name I raise it. And if You take my soul, then have mercy upon it, and if You release it, then protect it with that which You protect Your righteous worshipers (Bismika rabbī waḍa`tu janbī wa bika arfa`uhu, fa’in amsakta nafsī farḥamhā wa in arsaltahā faḥfaẓhā bimā taḥfaẓu bihī `ibādakaṣ-ṣāliḥīn)’ And when he awakens, let him say: All praise is due to Allah, Who healed me in my body, and returned to me my soul, and permitted me to remember Him (Al-ḥamdulillāh alladhī `āfānī fī jasadī wa radda `alayya rūḥī wa adhina lī bidhikrih).’”

حَدَّثَنَا ابْنُ أَبِي عُمَرَ الْمَكِّيُّ، حَدَّثَنَا سُفْيَانُ، عَنِ ابْنِ عَجْلاَنَ، عَنْ سَعِيدٍ الْمَقْبُرِيِّ، عَنْ أَبِي هُرَيْرَةَ، رضى اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا قَامَ أَحَدُكُمْ عَنْ فِرَاشِهِ ثُمَّ رَجَعَ إِلَيْهِ فَلْيَنْفُضْهُ بِصَنِفَةِ إِزَارِهِ ثَلاَثَ مَرَّاتٍ فَإِنَّهُ لاَ يَدْرِي مَا خَلَفَهُ عَلَيْهِ بَعْدَهُ فَإِذَا اضْطَجَعَ فَلْيَقُلْ بِاسْمِكَ رَبِّي وَضَعْتُ جَنْبِي وَبِكَ أَرْفَعُهُ فَإِنْ أَمْسَكْتَ نَفْسِي فَارْحَمْهَا وَإِنْ أَرْسَلْتَهَا فَاحْفَظْهَا بِمَا تَحْفَظُ بِهِ عِبَادَكَ الصَّالِحِينَ ‏.‏ فَإِذَا اسْتَيْقَظَ فَلْيَقُلِ الْحَمْدُ لِلَّهِ الَّذِي عَافَانِي فِي جَسَدِي وَرَدَّ عَلَىَّ رُوحِي وَأَذِنَ لِي بِذِكْرِهِ ‏" ‏ ‏.‏ قَالَ وَفِي الْبَابِ عَنْ جَابِرٍ وَعَائِشَةَ ‏.‏ قَالَ حَدِيثُ أَبِي هُرَيْرَةَ حَدِيثٌ حَسَنٌ ‏.‏ وَرَوَى بَعْضُهُمْ هَذَا الْحَدِيثَ وَقَالَ فَلْيَنْفُضْهُ بِدَاخِلَةِ إِزَارِهِ ‏.‏

sunnah.com