ذِكْرُ الْأَمْرِ بِمَسْأَلَةِ اللَّهِ جَلَّ وَعَلَا الْغُفْرَانَ لِمَنْ أَرَادَ أَنْ يَأْتِيَ مَضْجَعَهُ إِنْ أَمْسَكَ نَفْسَهُ وَحَفِظَهَا إِنْ أَرْسَلَهَا
When any one of you goes to bed, he should take hold of the hem of his lower garment and then should clean (his bed) with the help of that and then should recite the name of Allah for he himself does tiot know what he left behind him on his bed, and when he intends to lie on bed, he should lie on his right side and utter these words:" Hallowed be Allah, my Lord. It is with Thine (grace) that I place my side (upon the bed) and it is with Thee that I take it up (after sleep), and in case Thou withholdst my being (if thou causest me to die), then grant pardon to my being, and if Thou keepst (this process of breathing on), then protect it with that with which Thou protected Thine pious servants." (Using translation from Muslim 2714a)
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ «إِذَا أَوَى أَحَدُكُمْ إِلَى فِرَاشِهِ فَلْيَأْخُذْ دَاخِلَةَ إِزَارَهُ فَلْيَنْفُضْ بِهَا فِرَاشَهُ وَيُسَمِّي اللَّهَ فَإِنَّهُ لَا يَدْرِي مَا خَلَفَهُ عَلَيْهِ بَعْدَهُ عَلَى فِرَاشِهِ وَإِذَا أَرَادَ أَنْ يَضْطَجِعَ فَلْيَضْطَجِعْ عَلَى شِقِّهِ الْأَيْمَنَ وَلْيَقُلْ سُبْحَانَكَ رَبِّي بِكَ وَضَعْتُ جَنْبِي وَبِكَ أَرْفَعُهُ إِنْ أَمْسَكْتَ نَفْسِي فَاغْفِرْ لَهَا وَإِنْ أَرْسَلْتَهَا فَاحْفَظْهَا بِمَا حَفِظْتَ بِهِ عِبَادَكَ الصَّالِحِينَ»