How to Sleep Better: The Sunnah and Science of Sleep
It is three in the morning. You have turned from one side to the other, closed your eyes, tried to relax, but sleep simply will not come. When you wake up, your head feels heavy, your mood is low and you feel tired all day. Then the next night, a new fear appears: “What if I can’t sleep again?” And that fear pushes sleep even further away.
Insomnia is one of the most common problems of modern life. Students lose sleep over exams, workers over pressure, mothers over children, and older people over the natural changes of age.
This guide looks at sleep from three angles: how the Quran describes it, how the Prophet Muhammad صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ slept, and what modern medicine teaches about sleeping better.
Sleep in the Quran: One of Allah’s Signs
We often treat sleep as something ordinary. The Quran treats it as one of Allah’s great signs.
1. Sleep is a sign of Allah
وَمِنْ آيَاتِهِ مَنَامُكُم بِاللَّيْلِ وَالنَّهَارِ وَابْتِغَاؤُكُم مِّن فَضْلِهِ (Surah Ar Rum 30:23)
And among His signs is your sleep by night and day, and your seeking of His bounty.
This verse mentions sleep and earning a living together: the effort of the day and the rest of the night, which together create the balance of human life.
2. Sleep is rest
وَجَعَلْنَا نَوْمَكُمْ سُبَاتًا (Surah An Naba 78:9)
And We made your sleep a means of rest.
The word subat means to stop working and to rest. Sleep is the time when the body and mind repair themselves.
3. Sleep is a “minor death”
اللَّهُ يَتَوَفَّى الْأَنفُسَ حِينَ مَوْتِهَا وَالَّتِي لَمْ تَمُتْ فِي مَنَامِهَا (Surah Az Zumar 39:42)
Allah takes the souls at the time of their death, and those that do not die, during their sleep.
This verse gives sleep a spiritual depth. Every night, we hand our soul to Allah, and every morning He returns life to us. The duas for sleeping and waking are reminders of this reality.
4. Sleep is a gift of security
On the night before the Battle of Badr, the Muslims were few and their enemy was strong. In that atmosphere of fear, Allah sent them a special sleep:
إِذْ يُغَشِّيكُمُ النُّعَاسَ أَمَنَةً مِّنْهُ (Surah Al Anfal 8:11)
When He covered you with drowsiness, giving security from Him.
This verse shows that sleep is not only a physical process; it is also a gift of security and calm from Allah. When the heart is afraid, sleep does not come. When Allah gives the heart security, sleep follows.
The Prophet’s Sleep Routine
1. Early to bed, early to rise
The Prophet صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ would sleep soon after Isha and wake in the last part of the night for tahajjud. This routine fits perfectly with the body’s natural clock: sleeping when it gets dark and waking before the morning light.
2. A balance of sleep and worship
The Prophet صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ said that the most beloved prayer to Allah is the prayer of Prophet Dawud (peace be upon him): he would sleep half the night, pray for a third, then sleep for the remaining sixth (Sahih al Bukhari and Sahih Muslim).
Notice that this routine includes both worship and full sleep. Islam does not teach depriving the body of sleep in the name of worship. When some Companions planned to stay awake all night in prayer, the Prophet صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ said that he prays and he also sleeps, and whoever turns away from his Sunnah is not from him (Sahih al Bukhari and Sahih Muslim).
3. Qaylulah: the midday rest
The Companions had a habit of resting briefly around midday, known as qaylulah. A short midday rest reduces daytime tiredness and reduces the need to stay up late. However, it should be short, because a long afternoon sleep can disturb sleep at night.
The Sunnah Etiquette Before Sleeping
The Prophet صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ taught a beautiful set of practices before sleep, which bring both spiritual peace and physical rest:
- Make wudu: He told al Bara ibn Azib: when you go to bed, make wudu as you do for prayer, then lie on your right side (Sahih al Bukhari and Sahih Muslim).
- Lie on your right side.
- Dust off your bed: He instructed shaking out the bed before lying on it (Sahih al Bukhari).
- Recite Ayat al Kursi: According to a hadith, whoever recites Ayat al Kursi before sleeping will have a guardian from Allah, and Shaytan will not come near him until morning (Sahih al Bukhari).
- Recite the last three surahs: Recite Surah Al Ikhlas, Al Falaq and An Nas, blow into your hands, and wipe them over your body (Sahih al Bukhari).
- Tasbih of Fatimah: The Prophet صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ taught Fatimah and Ali to say SubhanAllah 33 times, Alhamdulillah 33 times and Allahu Akbar 34 times before sleep, and said this was better for them than a servant (Sahih al Bukhari and Sahih Muslim).
- The dua for sleep: بِاسْمِكَ اللَّهُمَّ أَمُوتُ وَأَحْيَا, “In Your name, O Allah, I die and I live” (Sahih al Bukhari).
These practices are not only a source of reward. Together, they form a calming bedtime routine, which modern sleep medicine considers essential. When the same steps are repeated every night, the brain begins to recognise them as a signal that it is time to sleep.
Duas for Fear, Bad Dreams and Sleepless Nights
When you feel fear or unease at night
The Prophet صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ taught this dua for anxiety during sleep:
أَعُوذُ بِكَلِمَاتِ اللَّهِ التَّامَّةِ مِنْ غَضَبِهِ وَعِقَابِهِ، وَشَرِّ عِبَادِهِ، وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ
I seek refuge in the perfect words of Allah from His anger and His punishment, from the evil of His servants, and from the whisperings of the devils and from their coming to me (Jami at Tirmidhi).
After a bad dream
The Prophet صَلَّى اللهُ عَلَيْهِ وَعَلَى آلِهِ وَسَلَّمَ said that good dreams are from Allah and bad dreams are from Shaytan. If someone sees a bad dream, he should lightly spit to his left three times, seek refuge in Allah from Shaytan, turn over onto his other side, and not tell anyone about it; then it will not harm him (Sahih al Bukhari and Sahih Muslim).
When you wake up and cannot fall back asleep
If you wake up at night and cannot sleep again, do not treat it as wasted time. The last part of the night is a time when duas are accepted. While lying in bed, repeat “La ilaha illallah” or “Astaghfirullah”. Often, this calm remembrance itself brings the heart back to rest and leads you back to sleep.
Common Causes of Insomnia
1. Mental causes
- Worry, stress and overthinking
- Sadness and depression
- The effect of a shock or trauma
2. Daily habits
- Tea and coffee at night: In many South Asian homes, evening tea is a beloved tradition. But tea contains caffeine, which stays in the body for hours and can keep sleep away.
- Heavy meals late at night: When the stomach is full, the body stays busy digesting, and sleep does not come easily.
- No fixed bedtime: sometimes midnight, sometimes two in the morning.
- Phones and TV in bed.
- Too little physical activity during the day.
- Long afternoon naps.
3. Physical causes
- Pain, coughing or breathing problems
- Thyroid or hormonal issues
- Side effects of some medicines
- Snoring and pauses in breathing (sleep apnea): If someone snores loudly and their breathing stops and starts during sleep, it is a medical condition that needs to be checked.
Science Based Habits for Better Sleep
One of the most effective modern treatments for insomnia is called CBT-I (Cognitive Behavioural Therapy for Insomnia). Some of its basic principles are simple and practical:
- Keep a fixed schedule: Sleep and wake at the same time every day, even on weekends. Fajr prayer is a natural anchor for this routine.
- Use your bed only for sleep: Avoid phones, TV and work in bed, so your brain links the bed with sleep alone.
- The twenty minute rule: If you cannot sleep after about twenty minutes, get up. Go to another room with soft light, recite the Quran or make dhikr, and return to bed when you feel sleepy. Lying in bed and worrying pushes sleep further away.
- Cut caffeine after Asr: Avoid tea and coffee in the evening.
- Eat a light, early dinner: Finish eating at least two to three hours before sleep.
- Get daylight and movement: Spend some time in morning light, and walk or exercise during the day.
- Make your room calm: dark, quiet, and at a comfortable temperature.
- Write down your worries: Before bed, write tomorrow’s tasks and concerns on paper, so your mind does not carry them to bed.
An Ideal Daily Sleep Routine

Three Real Life Examples
Bilal, an office worker: Bilal stayed awake until two every night and went to work exhausted. He realised he was drinking tea at ten at night and scrolling on his phone in bed for hours. He stopped tea after Asr, kept his phone out of the bedroom, and started the Sunnah bedtime routine. Within two weeks, he was falling asleep around eleven again.
Rukhsana, a mother: Rukhsana lay awake worrying about her children. She began writing her worries in a diary before bed, then making dua and handing them to Allah. She also started reciting Ayat al Kursi and the Tasbih of Fatimah. She found that her worries no longer followed her into bed.
Hajji Sahib, an elderly man: Hajji Sahib complained that he could not sleep well and snored loudly. His family took him to a doctor, who arranged a sleep study and diagnosed sleep apnea. After treatment, both his sleep and his daytime energy improved.
When to See a Doctor
Please see a doctor if:
- You have had trouble sleeping for more than three weeks.
- You snore loudly and your breathing stops and starts during sleep.
- You feel very sleepy during the day, especially while driving.
- Your sleeplessness comes with sadness, severe anxiety or hopelessness.
- You cannot sleep without sleeping pills.
An important warning: Do not take sleeping pills without medical advice. They can be habit forming and may hide the real problem.
End Your Night With the Quran
The best way to end the night is with the words of Allah. When you learn to read and understand the Quran, your recitation before sleep becomes the greatest comfort for your heart.
- Quran Reading and Noorani Qaida: learn to read correctly.
- Tajweed: make your night recitation beautiful.
- Quran Translation: understand the surahs you recite before sleep.
- Hifz ul Quran: memorise the Sunnah surahs.
We offer one to one online classes for all ages, with expert male and female teachers, and modern, slide based teaching for children. Book your 3 day free trial. Contact us now.
👉 Contact us now: siratislamic.com/contact
👉 WhatsApp: +92 322 4159683
For the bigger picture, read our complete guide: Islamic Psychology Explained.