How Late Can You Have Caffeine Without Hurting Your Sleep?
What a trial of caffeine 0, 3, and 6 hours before bed found, the meta-analysis behind the 8.8-hour rule for coffee, why sensitivity varies, and how to test your own cut-off.
By [Author name]3 min read
Caffeine lasts longer than most people think. A 2023 meta-analysis concluded that, to avoid losing sleep, a typical cup of coffee should be drunk at least 8.8 hours before bed, and a large dose such as a pre-workout supplement more than 13 hours before. For someone going to bed at 11 pm, that means the last coffee by about 2 pm.
This article is general information, not medical advice.
What the Studies Found
- Even 6 hours before bed. In a trial by Drake and colleagues, 12 healthy adults took 400 mg of caffeine (about four cups of coffee) or a placebo at bedtime, 3 hours before, or 6 hours before. All three caffeine times disturbed sleep, measured at home with a sleep monitor, and even 6 hours before bed it reduced total sleep by about 40 minutes or more. In the researchers’ account, participants seemed unaware of the disturbance at 6 hours.
- Across studies. Gardiner and colleagues’ 2023 meta-analysis found that caffeine reduced total sleep time by 45 minutes and sleep efficiency by 7%, and lengthened the time to fall asleep by 9 minutes and wake after sleep onset by 12 minutes. Deep sleep fell and light sleep rose. From the dose and timing in the studies, they estimated the 8.8-hour and 13.2-hour cut-offs for 107 mg (a 250 mL coffee) and 217.5 mg.
Why People Differ
The time the body takes to clear caffeine varies a lot between people. The European Food Safety Authority’s (EFSA) opinion on caffeine describes a half-life (the time to clear half of it) of a few hours in most adults, longer in pregnancy and with some medicines, including oral contraceptives, and shorter in smokers. That’s why some people sleep fine after an evening espresso and others can’t sleep after a lunchtime one.
Testing Your Own Cut-Off
- Log your caffeine by time for two or three weeks: coffee, tea, energy drinks, and chocolate all count.
- Keep bedtime and wake time steady.
- Then move your last caffeine earlier, such as to noon, for two weeks.
- Compare your time to fall asleep, total sleep time, and how rested you feel between the two periods.
How much caffeine is safe in a day is a separate question; see How Much Caffeine Is Safe in a Day?
Following It in Kaizora
Dietary Caffeine comes from the foods and drinks you log on Food Log (Cronometer’s import and Apple Health’s export bring it in too) and is counted at the time you had it, so the Timeline shows your last coffee beside the night that followed. On Correlations, put caffeine beside Sleep Onset Latency or Total Sleep Time by day, and Discover (Plus) ranks pairs of your metrics by how strongly they move together, including with a lag of a day.
The Short Version
- Caffeine 6 hours before bed still disturbed sleep in a controlled trial.
- A meta-analysis suggests a coffee at least 8.8 hours before bed, a large dose 13 hours or more.
- Sensitivity varies; test your own cut-off with a few weeks of logging.
Sources
- Drake C et al., “Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed,” Journal of Clinical Sleep Medicine 9, no. 11 (2013): 1195–1200. doi:10.5664/jcsm.3170
- European Food Safety Authority Panel on Dietetic Products, Nutrition and Allergies, “Scientific opinion on the safety of caffeine,” EFSA Journal 13, no. 5 (2015): 4102. doi:10.2903/j.efsa.2015.4102
- Gardiner C et al., “The effect of caffeine on subsequent sleep: a systematic review and meta-analysis,” Sleep Medicine Reviews 69 (2023): 101764. doi:10.1016/j.smrv.2023.101764
Related Articles
How Does Alcohol Affect Your Sleep?
Why a drink helps you fall asleep and then disrupts the second half of the night, what it does to REM sleep and heart rate, how much it takes, and how to see the effect in your own data.
Sleep · 2 min read
How Long Should a Nap Be?
What a trial of 5-, 10-, 20-, and 30-minute naps found, why longer naps leave you groggy, the best time of day to nap, and how naps count towards your sleep.
Sleep · 2 min read
How Much Caffeine Is Safe in a Day?
The 400 mg a day for most adults that the FDA and EFSA cite, the 200 mg limits for a single dose and in pregnancy, how much caffeine common drinks hold, and why people differ.
Nutrition · 2 min read