Caffeine can measurably shorten your sleep even when you drink it six hours before bed. That is not an estimate; it is the central finding of a controlled trial by Drake and colleagues in the Journal of Clinical Sleep Medicine, which gave participants 400 mg of caffeine in pill form at either 6, 3 or 0 hours before their scheduled bedtime and measured what happened.

The result was consistent across all three timings: "reductions in duration relative to placebo were significant at each of the caffeine administration time points, reducing TST between 1.1 to 1.2 hours." TST is total sleep time. Over an hour of sleep, lost to a drink taken in the late afternoon. This piece is part of our complete guide to better sleep.

What the research actually measured

The design is what makes this study worth citing rather than the headline. Caffeine was given in pill form, which removes the guesswork of cup sizes and brewing strength, and sleep was recorded both by a sleep monitor and by participants' own diaries. That pairing is the interesting part, because the two measurements disagreed.

Caffeine taken Detected by objective monitoring? Detected by participants' own diaries?
0 hours before bed Yes Yes
3 hours before bed Yes Yes
6 hours before bed Yes Not clearly: a 41-minute reduction that only approached significance

In the authors' words: "Caffeine-induced sleep disturbance was detected by both the self-report diary and objective sleep measures when taken at bedtime and 3 hours prior to bedtime, whereas only the objective measure detected differences when caffeine was taken 6 hours prior to bedtime." The six-hour diary figure was a reduction of 41 minutes, which the paper reports as approaching significance rather than reaching it.

So the popular version of this study, that people simply do not notice, is not quite right. Closer to bedtime, they noticed. At six hours out, the effect was real on the monitor while their own accounts did not clearly register it. That gap is the practical problem.

Why you may not notice the effect

Because you are comparing the night you had against the night you assume you would have had, and you have no access to the second one. The trial had a placebo condition and a sleep monitor. You have a memory of falling asleep fine.

The authors drew the same conclusion, and it is the reason this piece exists: "The lack of perceived sleep disruption during early evening administration combined with the objective findings of the present study argue for continued education regarding the sleep disruptive effects of caffeine."

This also explains a common experience covered in why you wake up tired after a full night. If your sleep was shortened or lightened by something you had at 4pm, the morning feels inexplicable, because the cause was hours earlier and produced no obvious sensation at the time.

How much does this vary between people?

Honestly, this study cannot tell you. It used a single fixed dose in a controlled sample, and it was not designed to map individual differences in metabolism or tolerance. So we are not going to publish a personal sensitivity figure or a half-life number, because the source cited here does not contain one.

Two things are worth saying that the evidence does support. First, 400 mg is a specific quantity, and we are deliberately not converting it into cups: brewing method, cup size and bean vary far too much for that arithmetic to be honest. Check the label or the vendor's published figure if you want to know what you are actually drinking. Second, the direction of the finding is consistent enough to act on even without a personal number: measurable disruption at six hours, in a group of people who largely did not perceive it.

A practical cutoff

The CDC/NIOSH bulletin on sleep advises avoiding "caffeine, chocolate, and nicotine for 5 or more hours before sleep." Set against the trial, five hours reads like a floor rather than a comfortable margin, since disruption was still measurable at six.

A workable approach:

  1. Fix your cutoff to your bedtime, not to the clock. An 11pm bedtime and a 2pm cutoff are the same rule as a 10pm bedtime and a 1pm one.
  2. Start at six hours, not five. The guidance says 5 or more; the measured effect at 6 suggests taking the "or more" seriously.
  3. Count everything, not just coffee. CDC/NIOSH groups chocolate and nicotine into the same window.
  4. Test it for two weeks with a fixed wake time. Without a steady wake time you are measuring against a moving baseline, which is why that habit leads our sleep hygiene checklist.

If sleep does not improve after a genuine trial of this, caffeine was probably not your bottleneck. The other usual suspects are covered in why you cannot fall asleep and what alcohol does to sleep quality.