The Caffeine GuideEnjoy it and sleep well
A brain lit in deep blue
Sleep and timing

Does caffeine affect deep sleep?

By GyroscopeUpdated November 14, 20264 sources
On this page
  1. What caffeine does to a night
  2. The dose decides how much
  3. Why it happens
  4. Can you feel it?
  5. Test it on yourself

Yes. Across 24 studies, caffeine cut deep sleep by about 11 minutes a night and total sleep by about 45. In a 2025 trial, 400 mg taken 4 hours before bed cut about 30 minutes of deep sleep, and taken 12 hours before it still cut about 21.

Most people judge a coffee by whether they can fall asleep. Across those 24 studies, caffeine made falling asleep only about 9 minutes slower. The deep sleep goes missing after you’re already asleep, so there’s nothing to notice at the time. You find out the next day, if at all.

We think deep sleep is the cost of caffeine you don’t feel. If you fall asleep fine but wake up tired, move your last cup earlier for two weeks before you blame anything else.

What caffeine does to a night

A 2023 review pulled together 24 studies where people had caffeine or a placebo before sleep. On average, caffeine changed the night like this:

MeasureChange with caffeine
Total sleepabout 45 minutes less
Sleep efficiency, the share of time in bed spent asleepabout 7% lower
Time to fall asleepabout 9 minutes longer
Time awake after falling asleepabout 12 minutes more
Light sleepabout 6 minutes more
Deep sleepabout 11 minutes less

The dose decides how much

The 2025 trial gave 23 healthy young men 100 mg or 400 mg at 12, 8 or 4 hours before bed, on separate nights, and measured their sleep at home with a forehead monitor.

Dose and timingDeep sleep
100 mg at 12, 8 or 4 hoursnothing measurable
400 mg at 12 hoursabout 21 minutes less
400 mg at 8 hoursabout 15 minutes less, and about 29 more minutes awake
400 mg at 4 hoursabout 30 minutes less, and about 51 minutes less sleep in all

A small coffee in the afternoon looks safe in these numbers. A big dose costs deep sleep even 12 hours before bed, which for an 11pm bedtime is 11am.

Why it happens

The longer you’re awake, the more adenosine builds up in your brain, and adenosine is one of the main signals that makes you sleepy. Caffeine works by blocking the receptors adenosine uses. Whatever caffeine is still in you at night keeps blocking some of them, and the sleep you get is lighter and more broken.

Can you feel it?

Mostly not. In the 2025 trial, the men only rated their sleep worse after 400 mg at 4 hours, and just 22% could guess both the dose and the timing they’d had. In a 2013 study, 400 mg 6 hours before bed cut more than an hour of measured sleep, but people’s own diaries put it at 41 minutes. The myth I fall asleep fine, so coffee isn’t hurting my sleep has the whole story.

Test it on yourself

If you track your sleep with a ring or a watch, compare your deep sleep and time awake over a week with your usual last cup and a week with it moved earlier. Without a tracker, write down each morning how rested you feel. The cutoff clock shows what your current day leaves at bedtime. HRV is a different story, and hrv.guide covers whether caffeine lowers HRV.

The cup beats the clock

Dose
12 hours before bed
8 hours before bed
4 hours before bed
100 mgabout a cup
21 mg leftNothing measurable
37 mg leftNothing measurable
64 mg leftNothing measurable
400 mgabout four cups
84 mg left21 minutes less deep sleep
146 mg left15 minutes less deep sleep, 29 more minutes awake
255 mg left51 minutes less sleep, 30 minutes less deep sleep
Left at bedtime on a 5 hour half-life, and what a 2025 trial of 23 healthy young men measured with a sleep monitor at home (Gardiner 2025). The dose row changes more than the hour column.
4 sources
  1. Gardiner C and others, The effect of caffeine on subsequent sleep: a systematic review and meta-analysis, Sleep Medicine Reviews, 2023doi.org
  2. Gardiner C and others, Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial, Sleep, 2025doi.org
  3. Drake C, Roehrs T, Shambroom J, Roth T, Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed, Journal of Clinical Sleep Medicine, 2013pmc.ncbi.nlm.nih.gov
  4. Reichert CF, Deboer T, Landolt HP, Adenosine, caffeine, and sleep-wake regulation: state of the science and perspectives, Journal of Sleep Research, 2022doi.org
With Gyroscope One, you see the milligrams and the time of your last cup, found in your drinks, next to your sleep. Open Gyroscope

Your personalized guide

Is my coffee keeping me up?

Eight taps. You get how much caffeine is still in you when you fall asleep, the latest time for the drink you actually have, and the one change for tonight.

  • What you fall asleep with, in milligrams
  • Your cutoff for your own drink
  • Free, under a minute
Start