The caffeine cutoff: how many hours before bed the data suggests

By , a clinical and sports dietitian based in the EU · · 3 min read

A meta-analysis of 24 studies put numbers on caffeine's sleep cost and on the gap you need before bed. For a typical pre-workout serving, the answer is over 13 hours.

"Caffeine doesn't affect me, I can fall asleep after an espresso." Falling asleep is only one part of sleep, and it is the part caffeine affects least.

What 24 studies show

A 2023 systematic review and meta-analysis in Sleep Medicine Reviews pooled 24 studies on caffeine and that night's sleep. On average, caffeine:

  • cut total sleep time by 45 minutes;
  • cut sleep efficiency by 7%;
  • added 9 minutes to the time it took to fall asleep;
  • added 12 minutes of wake time after first falling asleep;
  • added about 6 minutes of light sleep and removed about 11 minutes of deep sleep.

So the bigger cost is in the night, not at lights-out.

The cutoff numbers

The same paper estimated how long before bed caffeine has to be taken to avoid losing total sleep:

SourceCaffeineTake it at least
Coffee (250 mL)107 mg8.8 h before bed
Standard pre-workout serving217.5 mg13.2 h before bed

With a 23:00 bedtime, that means coffee by about 14:10, and a typical pre-workout serving by about 09:50.

Six hours is not a safe margin for big doses

An earlier controlled study gave 400 mg of caffeine at bedtime, 3 hours before, or 6 hours before, and compared each with placebo in people sleeping at home. All three timings disrupted sleep significantly, including the 6-hour one. The authors concluded that substantial caffeine should be avoided for at least 6 hours before bed. The meta-analysis above suggests that for many doses, 6 hours is the floor, not the target.

The evening-training problem

If you train at 18:00 and take a pre-workout serving, the 13.2-hour estimate runs past 07:00 the next morning. The data does not say you can never do this. It says you should expect a cost, and that a smaller dose or no dose for late sessions is the variable to test first. Some people pair caffeine with L-theanine for "smoother" focus; that does not make the caffeine leave your system faster.

EFSA reached a similar conclusion from a different direction: single doses of 100 mg (about one cup of filter coffee) may affect sleep duration and patterns in some adults, particularly close to bedtime.

These are averages. People clear caffeine at different speeds, so your personal cutoff may be earlier or later.

Sources

  • Gardiner C et al. 2023. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Med Rev 69:101764. PubMed 36870101
  • Drake C, Roehrs T, Shambroom J, Roth T. 2013. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. J Clin Sleep Med. PubMed 24235903
  • EFSA. 2015. Caffeine: questions and answers and Scientific Opinion on the safety of caffeine (EFSA Journal 13(5):4102). EFSA caffeine topic page

Add your data point. Rate caffeine and note when you take your last dose. Sleep ratings with timing attached are the most useful rows in the dataset. Subscribe below for the monthly report.

Not medical advice. Talk to a doctor or pharmacist before starting a supplement, especially if you take medication.

Related supplements