Aurelo
Aurelo Health / Guides

Does caffeine affect deep sleep?

Yes. Pooled across studies, caffeine cut total sleep by about 45 minutes and deep sleep by about 11 minutes, and to avoid losing total sleep, a regular coffee should be finished at least 8.8 hours before bed.

Updated October 1, 2026 · 3 sources, listed at the end

What caffeine does to a night’s sleep

A 2023 meta-analysis in Sleep Medicine Reviews pooled 24 studies of caffeine taken before sleep. Compared with no caffeine, the nights that followed it looked like this:

MeasureChange with caffeine
Total sleep45 minutes less
Time to fall asleep9 minutes longer
Awake after first falling asleep12 minutes more
Sleep efficiency (time asleep in bed)7% lower
Deep sleep (stages N3 and N4)11.4 minutes less
Light sleep (stage N1)6.1 minutes more

So the loss isn’t only time. Caffeine trades some deep sleep (stages N3 and N4) for lighter, more broken sleep.

How late is too late?

The same meta-analysis worked out how long before bed caffeine stopped cutting total sleep time:

These are averages across studies. Your own cutoff may be earlier or later, which is why it’s worth checking against your own nights (below).

It also moves your body clock

Caffeine doesn’t just keep you awake. In a controlled study, the caffeine in a double espresso taken three hours before bedtime delayed the body’s own melatonin rhythm by about 40 minutes in a small lab study.

If you take melatonin, the cutoff times above apply too: evening caffeine delays the body’s own melatonin rhythm.

More: Does Caffeine Cancel Out Melatonin?

How much is too much?

For most adults, the FDA cites 400 mg a day, about two to three 12-ounce cups of coffee, as an amount not generally associated with negative effects. A 12-ounce cup of regular brewed coffee holds roughly 113 to 247 mg, so the size of the cup and the brew matter as much as the number of cups.

For sleep, though, the total isn’t the whole story: the cutoff times above show that when you have it matters too.

Find your own cutoff

Aurelo Health does that comparison for you, says whether it’s a pattern or only a hint, and shows the dates behind it.

Log what you drink and when, rate the morning, and Aurelo shows which nights your coffee cost you.

Get started free

Related questions

Sleep and energy tracker →

Sources

  1. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis, Sleep Medicine Reviews, 2023
  2. Burke et al., Effects of caffeine on the human circadian clock in vivo and in vitro, Science Translational Medicine, 2015
  3. U.S. FDA, Spilling the Beans: How Much Caffeine Is Too Much?

General information from the cited sources, not medical advice. If you are pregnant, take medication or have a heart or sleep condition, ask a doctor or pharmacist about caffeine.