“No coffee after 2 p.m.” is the standard advice, and like most sleep hygiene rules it was passed around for years before anyone measured it. Recent trials have now measured it, and the answer is less about the clock than about the dose. A single cup in the afternoon and a large cold brew at lunch are different questions, and the research treats them differently.
What caffeine does to sleep, measured
A 2023 systematic review and meta-analysis in Sleep Medicine Reviews pooled the controlled studies of caffeine and overnight sleep. Across the included trials, caffeine consumption reduced total sleep time by 45 min and sleep efficiency by 7%, with people taking longer to fall asleep and spending more time awake during the night. Deep sleep fell and light sleep rose.
Those are averages across doses and timings, so they overstate what a single morning coffee does and understate what a late double espresso does. The useful part of the review is that it modelled timing.
The 8.8-hour figure
From that modelling, the review’s headline recommendation was that to avoid a reduction in total sleep time, coffee (107 mg per 250 mL) should be consumed at least 8.8 h prior to bedtime. For a larger dose, such as a pre-workout supplement, the cutoff stretched to over 13 hours.
For someone who goes to bed at 11 p.m., 8.8 hours means no coffee after about 2 p.m., which is where the folk rule came from, roughly vindicated. But the figure is for a standard cup, and it is a population average. Two things change it: dose and individual metabolism.
Dose matters more than the clock
An older home-based study set the pattern by giving caffeine (400 mg) administered at 0, 3, and 6 hours prior to habitual bedtime and comparing self-reported sleep with placebo. The design tested whether a large dose was still disruptive at six hours out, and the answer, as later research confirmed, was yes.
The clearest recent trial was published in Sleep in 2025. It was a placebo-controlled, double-blind crossover in 23 males (25.3 ± 5.0 years) with a moderate habitual caffeine intake, each completing seven conditions: placebo, and 100 or 400 mg of caffeine taken 12, 8 or 4 hours before bed, with sleep measured by in-home polysomnography.
The results split cleanly by dose. The authors’ conclusion was that a 100 mg dose of caffeine can be consumed up to 4 hours prior to bedtime without a significant effect, while 400 mg altered sleep even when taken 12 hours before bed, with the disruption growing the closer to bedtime it was taken.
In plain terms: one ordinary coffee at 7 p.m. did not measurably change sleep in these participants. Four coffees’ worth at 11 a.m. did.
You will not necessarily feel it
The same trial found something uncomfortable for anyone who says caffeine does not affect their sleep. Perceived sleep quality dropped only when the large dose was taken four hours before bed, even though the objective recordings showed disruption at eight and twelve hours too. The authors’ reading was that individuals may have difficulty accurately perceiving the influence of caffeine on sleep quality. Feeling fine is not evidence that your sleep was fine.
What the evidence does not settle
The 2025 trial was 23 young men with moderate intake; it says nothing directly about women, older adults, heavy daily users, or people who metabolise caffeine slowly. Caffeine half-life varies widely between people, and the trials report averages. The meta-analysis pooled studies with different designs, doses and sleep measures, so 8.8 hours is a modelled estimate, not a law.
What you can take from it is the shape of the answer: small doses are forgiving of timing, large doses are not, and your own perception is an unreliable guide.
This is not individual medical advice. If you are pregnant, take medication that interacts with caffeine, or have a sleep or anxiety disorder, dose and timing decisions belong with a clinician.
Common questions
How many hours before bed should you stop drinking coffee?
A 2023 meta-analysis estimated that a standard coffee (about 107 mg caffeine) should be consumed at least 8.8 hours before bed to avoid reducing total sleep time. A 2025 trial found a 100 mg dose taken four hours before bed did not measurably affect sleep, so the safe window depends heavily on dose.
Does caffeine affect sleep even if I fall asleep fine?
Yes, in the trial data. Objective recordings showed disruption from a 400 mg dose taken 8 or 12 hours before bed, but participants only noticed reduced sleep quality when it was taken 4 hours before bed.
How much does caffeine reduce sleep?
Pooled across controlled studies, caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7%, with less deep sleep. That average mixes large and small doses and early and late timings.
Is 400 mg of caffeine too much?
For sleep, a single 400 mg dose disrupted sleep architecture even when taken 12 hours before bed in the 2025 trial. That is roughly four standard coffees or one large energy drink taken at once.
The bottom line
Keep the afternoon cutoff for a normal cup and you are inside the evidence. The bigger risk is the dose you do not think of as “late”: a large morning or lunchtime intake that the trials show still shapes your sleep that night, whether or not you feel it.
Did this answer your question?
Thanks. That helps us decide what to fix.




Leave a comment