Home/Sleep/YourProtocol/How Late Can You Drink Coffee Before Bed?

How Late Can You Drink Coffee Before Bed?

What the sleep lab actually measured about late caffeine: the dose is the variable, your half-life is a range and not a number, and two of the most repeated claims about caffeine and sleep do not hold.

Mixed: two small crossover trials (one male-only, one industry funded) alongside a strong meta-analysis
In-house · synthesized from the cited primary sources
At a glance
Time
7 min
Difficulty
Beginner
Moderate Caffeine works by blocking adenosine, the molecule that builds sleep pressure through the day; of caffeine's known biochemical actions, only adenosine receptor inhibition happens at normal human consumption.
What the evidence says

Stop treating 5 hours as your personal number

Across healthy adults the measured half-life of caffeine spans 1.5 to 9.5 hours, around a mean of about 5. Two people drinking the same cup at the same hour can be in genuinely different situations at bedtime.
Why

Every tidy cutoff rule you have read silently assumes one shared half-life. The spread is the reason those rules disagree with each other and with people's experience. EVIDENCE TIER A.

Institute of Medicine, Caffeine for the Sustainment of Mental Task Performance, National Academies Press, 2001 (NCBI Bookshelf NBK223808)

Compare the two doses before you compare the two times

23 healthy young men, double-blind crossover, sleep measured by polysomnography, caffeine given 12, 8 and 4 hours before bed at 100 mg and 400 mg. At 100 mg there was no significant effect on objective or subjective sleep at any timing tested. At 400 mg four hours before bed, sleep onset latency rose 14.2 minutes (p=0.013) and total sleep time fell 50.6 minutes (p<0.001). At 400 mg twelve hours before bed, latency to persistent sleep still rose 15.3 minutes (p=0.020).
Why

Same people, same clock positions, opposite outcomes depending only on the dose. Note also that 400 mg still cost something at twelve hours out, so this is not an argument that timing is irrelevant. EVIDENCE TIER B: one crossover trial, n=23, and the participants were all men, so it has not been tested this way in women.

Gardiner et al., Sleep, 2025;48(4):zsae230 (PMID 39377163)

Judge caffeine by what is measured, not by whether you felt it

12 adults, randomized double-blind double-dummy placebo-controlled crossover, 400 mg, sleep measured by EEG. Total sleep time fell by about 1.1 to 1.2 hours at every timing tested, including six hours before bed. At six hours out the participants' own sleep diaries showed a 41 minute reduction that only approached significance (p=0.08), while the electrodes detected the loss.
Why

The gap between the electrodes and the diary is the practical point: people under-report what a large late dose costs them. EVIDENCE TIER B: n=12. DISCLOSURE: this study was funded by an investigator-initiated grant from Zeo Inc, whose sleep-monitoring headband was used, and a co-author was Zeo's Vice President of Scientific Affairs. We think the finding stands, and you should know who paid for it.

Drake, Roehrs, Shambroom & Roth, J Clin Sleep Med, 2013;9(11):1195-1200 (PMID 24235903)

Know the typical cost across studies

Pooling 24 studies: total sleep time down about 45 minutes, sleep efficiency down about 7%, deep sleep down about 11.4 minutes on caffeine nights.
Why

This is the best summary figure available, and it is also where the widely shared "stop 8.8 hours before bed" line comes from. That figure is an extrapolation from a meta-regression, not a condition anyone tested, and the same lead author's 2025 trial found 100 mg late did nothing measurable. Treat 8.8 hours as an illustration, not a rule. EVIDENCE TIER A for the pooled effect; the 8.8 hour cutoff is deliberately not published here as a rule.

Gardiner et al., Sleep Medicine Reviews, 2023;69:101764 (PMID 36870101)

Estimate your real load before you change your timing

Reference values: brewed coffee is about 95 mg per 8 fl oz cup, and a 1 fl oz espresso shot about 63 mg (USDA FoodData Central, FDC IDs 171890 and 171891). Measured specialty coffees ranged from 58 to 259 mg per dose, and averaged 188 mg (SD 36) per 16 oz cup. When researchers bought the same beverage from the same outlet on six consecutive days, that one drink alone ranged from 259 to 564 mg.
Why

A more than twofold swing in the same drink from the same place, across six days. If you are aiming at a dose, a large takeaway coffee or a scooped pre-workout is a guess, not a measurement. EVIDENCE TIER A.

McCusker, Goldberger & Cone, J Anal Toxicol, 2003;27(7):520-2 (PMID 14607010); USDA FoodData Central

Understand the mechanism, so the dose logic makes sense

Adenosine accumulates through the day and is the signal that builds sleep pressure. Caffeine is an adenosine receptor antagonist: it occupies the receptor so the signal does not land. Of caffeine's known biochemical actions, only adenosine receptor inhibition occurs at normal human consumption levels.
Why

Receptor occupancy is dose dependent, which is the mechanistic reason a small late dose can be unremarkable while a large one is not. EVIDENCE TIER A.

Fredholm et al., Pharmacological Reviews, 1999;51(1):83-133 (PMID 10049999); Reichert, Deboer & Landolt, J Sleep Res, 2022;31(4):e13597 (PMID 35575450)

Treat the CYP1A2 gene claim for sleep as unproven

An adult literature does suggest that variants in the adenosine receptor gene (ADORA2A) and the liver enzyme gene (CYP1A) correlate with caffeine-associated sleep disturbance. The two largest sleep-specific tests did not find the CYP1A2 link. A genome-wide study of 2,402 people implicated ADORA2A and reported no CYP1A2 association with the sleep phenotype. A study of 6,112 young people reports that neither ADORA2A nor CYP1A genetic variants were associated with sleep quality, duration, or caffeine dose, and that genotype by caffeine dose interactions were not detected.
Why

The claim that CYP1A2 slow metabolisers get worse sleep from caffeine is sold hard by consumer genetics marketing, and the two biggest sleep-specific tests are negative. If genetics matters here at all, the signal so far is at the receptor, not the liver enzyme. EVIDENCE TIER A for the null findings.

Byrne et al., Sleep, 2012;35(7):967-975 (PMID 22754043); Jessel et al., Genes, 2023;14(2):289 (PMID 36833216)

Judge caffeine by the dose currently in you

No study has measured a repayment event after caffeine, and no trial has ever moved people's last dose earlier and measured how fast their sleep recovered, so we do not publish a recovery timeline. What has been measured runs the other way: deep sleep goes down on caffeine nights in both the 2023 pooled analysis and the 2025 trial. In a 10-day polysomnography study in 20 healthy young men, neither total sleep time, sleep latency, sleep architecture nor subjective sleep quality differed between placebo, caffeine and caffeine-withdrawal conditions.
Why

People are often told caffeine borrows sleep pressure and that a rebound night pays it back. Nobody has measured that event. The honest version is simpler: the effect tracks the dose currently in you. EVIDENCE TIER A for the absence of evidence, B for the null result (n=20, men only).

Weibel et al., Scientific Reports, 2021;11:4668 (PMID 33633278)

Find your largest dose of the day, not your first one

If your biggest serve, a large takeaway coffee, an energy drink or a scooped pre-workout, lands within about nine hours of bedtime, either move it earlier or halve it. Leave the morning cup alone. Then log the time you actually fell asleep, not the time you got into bed, for seven nights.
Why

Dose is the variable the trials moved, and the biggest dose is the one most likely to be doing something. Logging sleep onset rather than bedtime is what makes the change visible to you, given how badly self-report tracked the objective loss in the Drake data.

Gardiner et al., Sleep, 2025; Drake et al., J Clin Sleep Med, 2013
The evidence 10
Moderate

Caffeine works by blocking adenosine, the molecule that builds sleep pressure through the day; of caffeine's known biochemical actions, only adenosine receptor inhibition happens at normal human consumption.

Caffeine for the Sustainment of Mental Task Performance (Institute of Medicine, National Academies Press, 2001) Read National Academies Press, NCBI Bookshelf NBK223808
Dose and Timing Effects of Caffeine on Subsequent Sleep: a Randomized Clinical Crossover Trial (Gardiner et al., Sleep, 2025) Read Sleep, 2025;48(4):zsae230
Caffeine Effects on Sleep Taken 0, 3, or 6 Hours Before Going to Bed (Drake et al., J Clin Sleep Med, 2013) Read J Clin Sleep Med, 2013;9(11):1195-1200
The Effect of Caffeine on Subsequent Sleep: a Systematic Review and Meta-analysis (Gardiner et al., Sleep Medicine Reviews, 2023) Read Sleep Medicine Reviews, 2023;69:101764
Caffeine Content of Specialty Coffees (McCusker, Goldberger & Cone, J Anal Toxicol, 2003) Read J Anal Toxicol, 2003;27(7):520-2
Adenosine, Caffeine, and Sleep-Wake Regulation (Reichert, Deboer & Landolt, J Sleep Res, 2022) Read J Sleep Res, 2022;31(4):e13597
Actions of Caffeine in the Brain (Fredholm et al., Pharmacological Reviews, 1999) Read Pharmacological Reviews, 1999;51(1):83-133
A Genome-wide Association Study of Caffeine-Related Sleep Disturbance (Byrne et al., Sleep, 2012) Read Sleep, 2012;35(7):967-975
Caffeine Consumption, Genetic Variation and Sleep in Adolescents (Jessel et al., Genes, 2023) Read Genes, 2023;14(2):289
Caffeine-Dependent Changes of Sleep-Wake Regulation (Weibel et al., Scientific Reports, 2021) Read Scientific Reports, 2021;11:4668

Not medical advice. This page is for education only and is not a substitute for professional medical care. Consult a qualified clinician before changing your health routine.
Editorial disclosure. This protocol is written and fact-checked by the YourProtocol editorial team directly from the primary sources cited below; it is not written or reviewed by any outside expert.

Is this for you
  • Anyone who has been told to stop caffeine at a fixed hour and found it did not help
  • Big-serve coffee, energy drink and pre-workout users
  • People who fall asleep fine after caffeine and still wake unrefreshed
  • Anyone sold a caffeine gene test
Cautions
  • Caffeine timing is about sleep quality, not a medical claim; if you have a heart, blood-pressure or anxiety condition, follow your clinician's caffeine guidance
  • Do not stop a heavy caffeine habit abruptly; taper
  • The two direct dose-and-timing trials here are small (12 and 23 participants) and the 23-participant trial enrolled men only, so none of this has been tested this way in women
  • If you are pregnant, trying to conceive or breastfeeding, caffeine guidance is different and lower than anything on this page; follow your own clinician's or midwife's advice
  • Educational only, not medical advice
Common questions
How many hours before bed should I stop drinking coffee?
There is no single hour that is right for everyone, because the measured half-life of caffeine ranges from 1.5 to 9.5 hours across healthy adults. What has been measured directly is dose: in a 2025 crossover trial in 23 healthy young men, 100 mg late had no significant effect on sleep at any timing tested, while 400 mg four hours before bed cost 50.6 minutes of total sleep.
Does caffeine have a 5 hour half-life?
About 5 hours is the mean, not your number. The measured range across healthy adults is 1.5 to 9.5 hours. That spread is exactly why cutoff-time rules disagree with each other and with people's own experience.
Should I stop caffeine 8.8 hours before bed?
That figure is an extrapolation from a meta-regression, not a condition anyone tested, and the same lead author's 2025 trial found 100 mg late did nothing measurable. Use it as an illustration of how long caffeine can linger, not as a rule.
Do slow caffeine metabolisers sleep worse?
For sleep specifically, the two largest tests are negative. A genome-wide study of 2,402 people linked the sleep phenotype to ADORA2A, the adenosine receptor gene, and found no CYP1A2 association, and a study of 6,112 young people found no association between ADORA2A or CYP1A variants and sleep quality or duration, and no genotype by caffeine dose interaction. An adult literature suggesting a link does exist, which is why we call this unproven rather than settled.
How much caffeine is in a coffee or an espresso?
Reference values put brewed coffee at about 95 mg per 8 fl oz and a 1 fl oz espresso shot at about 63 mg. Real drinks vary far more than that: measured specialty coffees ran from 58 to 259 mg per dose, and one beverage bought from the same outlet on six consecutive days measured between 259 and 564 mg.
If I sleep fine after coffee, is it still affecting me?
It can be. In a placebo-controlled crossover using EEG, 400 mg cut measured total sleep time by about an hour at every timing tested, while the participants' own diaries at six hours out showed a smaller loss that only approached statistical significance. Falling asleep is not the same measurement as sleeping well.
Get the next protocol first
Evidence updates, cited to the source. No spam.