(17) باب مَا يَقُولُ عِنْدَ النَّوْمِ وَأَخْذِ الْمَضْجَعِ
Abu Huraira reported Allah's Messenger (ﷺ) as say- ing:
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."
Reference: Sahih Muslim 2714 a
In-book reference: Book 48, Hadith 85
USC-MSA web (English) reference(deprecated numbering scheme): Book 35, Hadith 6554