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:
| Measure | Change with caffeine |
|---|---|
| Total sleep | 45 minutes less |
| Time to fall asleep | 9 minutes longer |
| Awake after first falling asleep | 12 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:
- A regular coffee (about 107 mg of caffeine in 250 mL): at least 8.8 hours before bed. For an 11 pm bedtime, that’s a little after 2 pm.
- A pre-workout supplement (about 217 mg): at least 13.2 hours before bed. For an 11 pm bedtime, that’s before 10 am.
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
- Log every coffee, tea, energy drink and pre-workout with the time you had it.
- Rate your sleep and energy each morning, or let your watch fill in the night through Apple Health.
- After two weeks, look at the nights after a late cup against the nights after an early one.
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 freeRelated questions
- Does Caffeine Cancel Out Melatonin?Evening caffeine can delay the body’s own melatonin rhythm.
- Should You Take L-Theanine With Caffeine?In one trial, L-theanine with caffeine improved some attention and memory measures and alertness compared with placebo.
- Does Caffeine Affect Calcium Absorption?Slightly. Caffeine reduces calcium absorption to a small extent; low vitamin D status reduces it more.
Sources
- The effect of caffeine on subsequent sleep: a systematic review and meta-analysis, Sleep Medicine Reviews, 2023
- Burke et al., Effects of caffeine on the human circadian clock in vivo and in vitro, Science Translational Medicine, 2015
- 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.
Aurelo