The Prophet’s Guidance in Sleep, Awakening and Dreams
He used to sleep either on a mattress, aleather mat, a straw mat, on the ground or on a bed. His mattress was made of leather stuffed with fibre, and so was his pillow.
He would not sleep more than he needed, neither would he deny himself the sleep he needed. He used to sleep in the early part of the night and pray in the latter part. He might also spend the first part of the night taking care of the affairs of Muslims.
When he stopped for rest late at night during a journey, he would sleep on his right side. but when he stopped just before dawn, he would place his head on his hand with his arm upright.
When he slept no one would awaken him until he woke up himself. His eyes would sleep but his heart remained awake. When he retired to bed, he would say: “Bismik- Allaahumma namutu wa nahya." (O Allah, in Your name we live and die.) He would cup his hands, blow into them, and recite into them Surahs Al-Ikhlaas, Al-Falaq and An-Nas and then wipe over whatever he could of his body, starting with his head, face and the front part of his body. He would do it three times.
He used to sleep on his right side and put his hand under his right cheek. Then he would say: "Allaahumma qinee `athaabaka yawma tab`athu `ibaadak." (O Allah protect me from your punishment on the Day You resurrect your servants.)
He also told some of his companions: “When you retire to your bed, perform wudhu' as you do for prayer, then lie on your right side and say: 'Allaahumma aslamtu nafsee ilayka wa wajjahtu wajhee ilayka wa fawwadhtu amree ilayka wa alja'tu thahree ilayka, aghbatan wa rahbatan ilayk. La malja'a wa la manjaa minka illa ilayk. Aamantu bikitaabik-all adhee anzalta wa binabiyyik- alladhee arsalt.' (O Allah, I have submitted myself to You and directed my face to You, entrusted my affairs to You and retreated to You, in hope and fear of You. There is no refuge and no safety from You except in You. I have believed in your Book, which You have revealed, and in Your prophet whom You have sent.) Make it your last words. Then if you die that night you will die in the natural state [of Islam]."
When he got up for night prayer he would say: "O Allah, Lord of Gabriel, Michael and Israfil,Creator of the heavens and earth, Knower of the invisible and the visible, You will judge between Your servants in that over which they used to differ.
Guide me in that where there is disagreement to the truth by Your permission. Indeed, You guide whom You will to the straight path.”
When he awakened from sleep he would say: ''Al-hamdu lillaahi-llathee ahyaana ba`dama amaatana wa ilayhin-nushoor.'' (Praise be to Allah who has brought us to life after He had given us death, and to Him is the resurrection). Then he would clean his teeth and might recite the last ten verses of Surah Aali-`Imran.
He used to awaken when the rooster crowed and would say, "Al-hamdulillah (Praise be to Allah), "Allahu akbar" (Allah is most reat), and "La ilaaha ill-Allah" (There is no god but Allah), and then supplicate.
And he said: “A good dream is from Allah, and a bad dream is from Satan. So if one of you has a dream he dislikes, he should spit [lightly] to his left three times when he awakens and seek refuge in Allah from Satan, for then it will not harm him. And he should not tell anyone of it. But if he sees a good dream he should consider it good tidings but not talk about it except to those he loves. And he advised whoever had a bad dream to turnover to the other side, and advised him to pray