Sleep · Research · 5 min · 6 sources

Afternoon coffee

In a home trial, 400 mg of caffeine taken six hours before bed cut sleep by more than an hour on a monitor. A review of 24 studies found caffeine cut sleep by 45 minutes on average.

Does a coffee at 4 pm still cost you sleep?

In one home trial, caffeine six hours before bed cut sleep by more than an hour, about as much as caffeine at bedtime.

In 2013, a sleep centre at a Detroit hospital tested this at home. Twelve healthy adults who drank caffeine regularly took part, aged 19 to 48.1

Each person had four test nights, with three pills on each: one due six hours before bed, one three hours before and one at bedtime. On one night all three were dummies. On the other three nights, one pill held 400 mg of caffeine, at a different time each night.1

Neither the volunteers nor the staff knew which night was which, and the order was balanced across people. They slept in their own beds with a headband monitor that recorded brain waves, and kept a sleep diary each morning.1

By the team's own count, 400 mg is about four cups of home-brewed coffee.1

Caffeine disrupted sleep at all three times. On the headband, each dose cut total sleep by 1.1 to 1.2 hours against the dummy night, six hours before bed included.1

The earliest dose was not clearly gentler. The three timings did not differ from one another in how much sleep they disrupted.1

For a 10 pm bedtime, six hours before is 4 pm. Count back from your own usual bedtime to find your own mark.1

Did people notice the lost sleep?

Less than the monitor showed. At six hours the diary showed a smaller loss that could be chance.

People also wrote a diary each morning. With caffeine at bedtime or three hours before, the diary and the headband both showed less sleep. Six hours before, only the headband did. The diary showed 41 fewer minutes, too small to be sure of.1

The authors suspect sleep fragmentation, sleep broken up by short awakenings, may explain part of the gap, because brief wake-ups may go unnoticed. They call the lack of awareness an important finding, since it may help explain why people keep drinking caffeine late.1

It was a small trial, and the authors say a small group may have hidden an effect in the diary. The headband may miss some time awake, and a grant from Zeo Inc paid for the study.1

If your nights feel fine after a late coffee, this trial suggests that feeling may miss part of the picture.1

Is that just one small trial?

No. A review of 24 studies found caffeine cut sleep by 45 minutes on average.

A 2023 review pooled 24 studies of caffeine and the night that followed. On average, caffeine cut total sleep by 45 minutes.2

People also took about 9 minutes longer to fall asleep and were awake for about 12 more minutes in the night. Deep sleep, the heaviest stage of the night, fell by about 11 minutes.2

An earlier review of epidemiological studies and randomized trials found the same direction. Caffeine typically made it take longer to fall asleep and cut total sleep. People also tended to rate their sleep as worse, so a loss is not always unnoticed.3

The 2023 review's authors suggest having a 250 mL cup of coffee at least 8.8 hours before bed, and a pre-workout drink, with about twice the caffeine, at least 13.2 hours before.2

Those are one review's suggestions, based on averages across studies. They cannot tell you where your own line sits.2

Does it show up in everyday life?

In a randomized trial of 100 adults, sleep was shorter on coffee days, as a wrist sensor recorded it.

In 2023, a team at the University of California, San Francisco asked 100 adults to wear a heart monitor, a wrist sensor and a glucose monitor for 14 days. Each day a text message told them, at random, to drink caffeinated coffee or avoid caffeine.4

The main question was about heart rhythm, and sleep was a side measure. On coffee days, people slept about 36 minutes less.4

The abstract does not say when in the day people drank their coffee, so it cannot say whether an afternoon cup mattered more. People were told to drink coffee or avoid caffeine, so they knew which day was which.4

Your watch records nightly sleep, the kind of number this trial compared across days.4

Why do some people sleep fine on coffee?

People differ, and one study linked it to a gene variant. One review says older adults may be more sensitive.

In mice, caffeine disturbs sleep by blocking a brain receptor called adenosine A2A. A team in Zurich asked whether a common variant of its gene explains why people react differently.5

In adults, habitual caffeine use went with poorer sleep quality in people who called themselves caffeine-sensitive, but not in those who called themselves insensitive. The two groups also differed in which version of the gene they carried.5

The 2017 review found large differences between young people too. It also found that older adults' sleep may be more sensitive to caffeine than younger adults'.3

A gene variant is one piece, tied here to people who rated themselves sensitive. It does not tell you how much sleep a given cup will cost you. Most studies in the 2017 review were in men in Western countries.3,5

So the averages above hide a spread. The same afternoon cup may cost you more or less than it costs a friend.3

Can caffeine move your body clock too?

In a small lab study, caffeine three hours before bed pushed the body's melatonin rhythm about 40 minutes later.

Researchers at the University of Colorado Boulder tested caffeine on the body's own clock. Five healthy adults each went through four test conditions over about 49 days, with dummy pills in some.6

Melatonin is the hormone that rises as the body's night begins, so a later melatonin rhythm means a later night.6

Neither the participants nor the staff knew who got caffeine. A dose matching a double espresso, taken three hours before usual bedtime, pushed the rhythm about 40 minutes later. That is nearly half the delay from three hours of bright evening light.6

Five people is a very small group, and the study reports the melatonin rhythm, not how well anyone slept. In cells grown in a dish, caffeine also lengthened the clock's cycle, which hints at how.6

Caffeine keeps you alert, and this study points to a second possible route: a later clock. It measured the melatonin rhythm, not sleepiness or sleep.6

What does this mean for you?

Caffeine can cost sleep even when nights feel normal. No study here names one cut-off that fits everyone.

  1. Count back. Two markers exist: the trial's dose six hours before bed, and the review's longer gap for a cup of coffee. Neither is a rule for your body.1,2
  2. Test it yourself. Compare nights after coffee days and caffeine-free days in your watch's sleep log. The trial of 100 adults did this with a wrist sensor.4
  3. Mind the dose. The home trial used about four cups' worth. The review's advice is for a single 250 mL cup.1,2
  4. Insomnia, or a heart rhythm problem? Ask your doctor before changing how much caffeine you have.

Sources

Every number in this article comes from these studies. Checked 12 November 2026.

  1. Drake C, Roehrs T, Shambroom J, Roth T. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine. doi:10.5664/jcsm.3170 · PubMed
  2. Gardiner C, Weakley J, Burke LM, et al. (2023). The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews. doi:10.1016/j.smrv.2023.101764 · PubMed
  3. Clark I, Landolt HP. (2017). Coffee, caffeine, and sleep: a systematic review of epidemiological studies and randomized controlled trials. Sleep Medicine Reviews. doi:10.1016/j.smrv.2016.01.006 · PubMed
  4. Marcus GM, Rosenthal DG, Nah G, et al. (2023). Acute effects of coffee consumption on health among ambulatory adults. New England Journal of Medicine. doi:10.1056/NEJMoa2204737 · PubMed
  5. Rétey JV, Adam M, Khatami R, et al. (2007). A genetic variation in the adenosine A2A receptor gene (ADORA2A) contributes to individual sensitivity to caffeine effects on sleep. Clinical Pharmacology and Therapeutics. doi:10.1038/sj.clpt.6100102 · PubMed
  6. Burke TM, Markwald RR, McHill AW, et al. (2015). Effects of caffeine on the human circadian clock in vivo and in vitro. Science Translational Medicine. doi:10.1126/scitranslmed.aac5125 · PubMed

Read next