Get WakeYa

Qiyam al-Layl: how to pray Tahajjud and still get enough sleep

The prayer of Dawud is also a sleep schedule. What the Sunnah says about the night prayer, what rising at night costs, and how to plan it so you can keep it.

A small oil lamp glowing beside a prayer rug on a wooden floor before tall windows, the sky outside deep blue with a thin band of amber on the horizon, and the edge of a bed with a wool blanket in the foreground.
AI-generated illustration

What the Qur’an and the Sunnah say about the night prayer

Tahajjud takes its name from the verb in this verse, addressed to the Prophet ﷺ:

وَمِنَ ٱلَّيْلِ فَتَهَجَّدْ بِهِۦ نَافِلَةً لَّكَ عَسَىٰٓ أَن يَبْعَثَكَ رَبُّكَ مَقَامًا مَّحْمُودًا

“And from [part of] the night, pray with it [i.e., recitation of the Qur’ān] as additional [worship] for you; it is expected that your Lord will resurrect you to a praised station.” Qur’an 17:79⁠[9]

The last third of the night has a place of its own. The Prophet ﷺ said:

يَنْزِلُ رَبُّنَا تَبَارَكَ وَتَعَالَى كُلَّ لَيْلَةٍ إِلَى السَّمَاءِ الدُّنْيَا حِينَ يَبْقَى ثُلُثُ اللَّيْلِ الآخِرُ يَقُولُ مَنْ يَدْعُونِي فَأَسْتَجِيبَ لَهُ مَنْ يَسْأَلُنِي فَأُعْطِيَهُ مَنْ يَسْتَغْفِرُنِي فَأَغْفِرَ لَهُ

“Our Lord, the Blessed, the Superior, comes every night down on the nearest Heaven to us when the last third of the night remains, saying: ‘Is there anyone to invoke Me, so that I may respond to invocation? Is there anyone to ask Me, so that I may grant him his request? Is there anyone seeking My forgiveness, so that I may forgive him?’” Sahih al-Bukhari 1145⁠[10]

When that last third begins depends on how long the night is where you live, and it changes through the year. This blog does not publish prayer times: ask your mosque or a scholar you trust how to determine it.

The prayer of Dawud is also a sleep schedule

أَحَبُّ الصَّلاَةِ إِلَى اللَّهِ صَلاَةُ دَاوُدَ ـ عَلَيْهِ السَّلاَمُ ـ وَأَحَبُّ الصِّيَامِ إِلَى اللَّهِ صِيَامُ دَاوُدَ، وَكَانَ يَنَامُ نِصْفَ اللَّيْلِ وَيَقُومُ ثُلُثَهُ وَيَنَامُ سُدُسَهُ، وَيَصُومُ يَوْمًا وَيُفْطِرُ يَوْمًا

“The most beloved prayer to Allah is that of David and the most beloved fasts to Allah are those of David. He used to sleep for half of the night and then pray for one third of the night and again sleep for its sixth part and used to fast on alternate days.” Sahih al-Bukhari 1131⁠[1]

Read with a sleep planner’s eyes, this is a night in three parts: sleep, prayer, sleep. Aisha (may Allah be pleased with her) described the Prophet’s own nights with the same shape:

كَانَ يَنَامُ أَوَّلَهُ وَيَقُومُ آخِرَهُ، فَيُصَلِّي ثُمَّ يَرْجِعُ إِلَى فِرَاشِهِ، فَإِذَا أَذَّنَ الْمُؤَذِّنُ وَثَبَ

“He used to sleep early at night, and get up in its last part to pray, and then return to his bed. When the Mu’adh-dhin pronounced the Adhan, he would get up.” Sahih al-Bukhari 1146⁠[11]

Here is what the three parts of Dawud’s night come to for a few night lengths. Take the length of your night from your mosque; the rest is arithmetic.

If the night lastsFirst sleep (½)Prayer (⅓)Second sleep (⅙)Sleep in total
8 hours4 h2 h 40 min1 h 20 min5 h 20 min
9 hours4 h 30 min3 h1 h 30 min6 h
10 hours5 h3 h 20 min1 h 40 min6 h 40 min
10½ hours5 h 15 min3 h 30 min1 h 45 min7 h
12 hours6 h4 h2 h8 h

The last column is the catch. Sleep research recommends 7 hours or more for adults on a regular basis.⁠[2] Two-thirds of a night reaches that only on long nights. On a short summer night, the full pattern leaves you well below it, which is why the rest of this article is about the smaller versions and how to pay for them.

A split night is not strange in itself. In an experiment at the US National Institute of Mental Health, healthy volunteers who spent 14 hours of each night in darkness usually began to sleep in two bouts of several hours, with 1 to 3 hours awake in between.⁠[12] That was a lab with very long nights, not an ordinary bedroom. It does show that waking in the middle of the night is not by itself a sign that something is wrong.

Why rising in the last third feels heavy

Deep sleep is front-loaded. It builds up within each sleep cycle, and both how fast it builds and how deep it gets decline from one cycle to the next.⁠[3] By the later part of the night, most of your deepest sleep is behind you.

Whether waking from deep sleep makes the grogginess worse is not settled; studies disagree.⁠[4] What is clear is the clock. Grogginess after waking is strongest during the biological night, near the low point of body temperature. In one study, sleep loss made it worse, especially when people were woken at the low point of the cycle, around 3 a.m.⁠[4] So if you usually sleep through until morning, expect the first minutes of the night prayer to be the hardest, and expect them to be harder after a short night.

What helps in those minutes is the same as for Fajr: three steps from the Sunnah, and what sleep research adds. Why the fog lasts as long as it does is its own article: sleep inertia, explained.

What a night prayer costs, and how to pay for it

Rising costs sleep: the minutes you are awake, plus however long it takes to fall asleep again. Is broken sleep worse than the same amount in one piece? One lab study points that way. Healthy adults who were woken eight times a night, three nights in a row, lost more deep sleep and more good mood than a group that slept the same total in one shorter block.⁠[13] Eight awakenings is far more broken than one prayer, so the study cannot tell you what a single planned awakening does.

The good news is that the total can be topped up. In a lab study with 90 healthy adults, people had between 4.2 and 8.2 hours in bed at night for 10 days, and most of them also got an afternoon nap of up to 2.4 hours. Alertness and sleepiness depended mainly on the total time in bed per 24 hours, however it was divided between night and nap.⁠[5] The midday nap was a normal part of the Companions’ day; Sahl ibn Sa’d (may Allah be pleased with him) said of Fridays, “We never had an afternoon nap nor meals except after offering the Jumu’a prayer.”⁠[14]

So the rule is simple: whatever time you spend awake at night, add it to your sleep elsewhere. Go to bed earlier by that much, or nap in the early afternoon.

The limits the Sunnah sets

The Prophet ﷺ had heard that Abdullah ibn Amr (may Allah be pleased with him) prayed all night and fasted every day, and Abdullah confirmed it. The answer:

فَإِنَّكَ إِذَا فَعَلْتَ ذَلِكَ هَجَمَتْ عَيْنُكَ وَنَفِهَتْ نَفْسُكَ، وَإِنَّ لِنَفْسِكَ حَقٌّ، وَلأَهْلِكَ حَقٌّ، فَصُمْ وَأَفْطِرْ، وَقُمْ وَنَمْ

“If you do so, your eye sight will become weak and you will become weak. No doubt, your body has right on you, and your family has right on you, so observe Saum (for some days) and do not observe it (for some days), offer Salat (for sometime) and then sleep.” Sahih al-Bukhari 1153⁠[6]

And for the moment sleep wins during the prayer:

إِذَا نَعَسَ أَحَدُكُمْ وَهُوَ يُصَلِّي فَلْيَرْقُدْ حَتَّى يَذْهَبَ عَنْهُ النَّوْمُ، فَإِنَّ أَحَدَكُمْ إِذَا صَلَّى وَهُوَ نَاعِسٌ لاَ يَدْرِي لَعَلَّهُ يَسْتَغْفِرُ فَيَسُبَّ نَفْسَهُ

“If anyone of you feels drowsy while praying he should go to bed (sleep) till his slumber is over because in praying while drowsy one does not know whether one is asking for forgiveness or for a bad thing for oneself.” Sahih al-Bukhari 212⁠[7]

When the Prophet ﷺ was asked which deeds Allah loves most, he said:

أَدْوَمُهَا وَإِنْ قَلَّ. وَقَالَ: اكْلَفُوا مِنَ الأَعْمَالِ مَا تُطِيقُونَ

“The most regular constant deeds even though they may be few.” He added, “Don’t take upon yourselves, except the deeds which are within your ability.” Sahih al-Bukhari 6465⁠[8]

So the goal is a night prayer you can keep, not the longest one you can manage once. How long a new routine takes to feel automatic is its own article: how long habits really take to form.

Three ways to fit it into your night

These are ways to plan your sleep, not rulings. How much to pray, and when, is between you and Allah; for questions of fiqh, ask a scholar.

  1. Just before Fajr. Set an alarm earlier than your Fajr alarm by however long you want to pray, and go to bed earlier by the same amount. Your sleep stays in one block.
  2. In the night, then back to bed. Wake, pray, and return to bed until the Adhan, as in Aisha’s description.⁠[11] Move your bedtime earlier by the time you spend awake, plus the time you need to fall asleep again. Keep the lights low and the phone away on your way back to bed: in a lab study, reading on a light-emitting tablet before bed made people take longer to fall asleep than reading a printed book.⁠[15]
  3. The full night of Dawud. On long winter nights, the table above shows that it can still leave 7 hours of sleep. On shorter nights, a nap has to make up the difference.⁠[5]

Sources

  1. 1 Sahih al-Bukhari 1131. sunnah.com. Narrated by Abdullah ibn Amr ibn al-As sunnah.com/bukhari:1131
  2. 2 Watson NF, Badr MS, Belenky G, et al. (2015). Recommended amount of sleep for a healthy adult: a joint consensus statement of the American Academy of Sleep Medicine and Sleep Research Society. Sleep. Consensus of 15 experts after reviewing 5,314 studies; for ages 18 to 60 pmc.ncbi.nlm.nih.gov/articles/PMC4434546
  3. 3 Dijk DJ (2009). Regulation and functional correlates of slow wave sleep. Journal of Clinical Sleep Medicine. Review of how deep sleep is regulated pmc.ncbi.nlm.nih.gov/articles/PMC2824213
  4. 4 Hilditch CJ, McHill AW (2019). Sleep inertia: current insights. Nature and Science of Sleep. Review of decades of research pmc.ncbi.nlm.nih.gov/articles/PMC6710480
  5. 5 Mollicone DJ, Van Dongen HPA, Rogers NL, Dinges DF (2008). Response surface mapping of neurobehavioral performance: testing the feasibility of split sleep schedules for space operations. Acta Astronautica. 90 healthy adults aged 21 to 49, 18 sleep schedules, 10 days in a lab pmc.ncbi.nlm.nih.gov/articles/PMC2633932
  6. 6 Sahih al-Bukhari 1153. sunnah.com. Narrated by Abdullah ibn Amr sunnah.com/bukhari:1153
  7. 7 Sahih al-Bukhari 212. sunnah.com. Narrated by Aisha sunnah.com/bukhari:212
  8. 8 Sahih al-Bukhari 6465. sunnah.com. Narrated by Aisha sunnah.com/bukhari:6465
  9. 9 Qur’an 17:79 (al-Isra). quran.com. Translation: Saheeh International quran.com/17/79
  10. 10 Sahih al-Bukhari 1145. sunnah.com. Narrated by Abu Hurairah sunnah.com/bukhari:1145
  11. 11 Sahih al-Bukhari 1146. sunnah.com. Narrated by al-Aswad, from Aisha sunnah.com/bukhari:1146
  12. 12 Wehr TA (1992). In short photoperiods, human sleep is biphasic. Journal of Sleep Research. Lab experiment with healthy volunteers and 14 hours of darkness a night pubmed.ncbi.nlm.nih.gov/10607034
  13. 13 Finan PH, Quartana PJ, Smith MT (2015). The effects of sleep continuity disruption on positive mood and sleep architecture in healthy adults. Sleep. 62 healthy adults in a sleep lab, randomized into three groups pmc.ncbi.nlm.nih.gov/articles/PMC4813351
  14. 14 Sahih al-Bukhari 939. sunnah.com. Narrated by Sahl ibn Sa’d sunnah.com/bukhari:939
  15. 15 Chang AM, Aeschbach D, Duffy JF, Czeisler CA (2015). Evening use of light-emitting eReaders negatively affects sleep, circadian timing, and next-morning alertness. Proceedings of the National Academy of Sciences. Lab study comparing a tablet with a printed book before bed pmc.ncbi.nlm.nih.gov/articles/PMC4313820