Caffeine and sleep have a timing problem, and the answer involves more than banning coffee after an arbitrary hour.
The afternoon coffee usually has a respectable job description: get you through the meeting, the drive home or the last stretch of work without developing a personal grievance against everybody breathing nearby. Fair enough. The complication is that the drink does not necessarily clock out when you do. By bedtime, the mug may be washed and back in the cupboard while some of its effects are still on the payroll.
That does not make coffee a villain. It makes dose and timing worth noticing. “I only had one” tells us surprisingly little when one drink can mean a modest serving or a container with the dimensions of a flower vase. The useful question is how much caffeine you had, how long before your planned sleep, and what else was in the day. Your coffee cup is not a unit of biology.
A useful experiment puts those questions together. In Gardiner and colleagues’ randomized crossover trial, published in the 2025 issue of Sleep, 23 healthy young men received 100 or 400 milligrams of caffeine four, eight or twelve hours before bed, or placebo. They also received their usual caffeine amount in the morning. The smaller experimental dose produced no statistically significant sleep changes. The 400-milligram dose altered some sleep measures even twelve hours before bed; at four hours, it reduced measured sleep time by about fifty minutes.
That is not a permission slip for everybody to have 100 milligrams four hours before bed. Nor does it mean every coffee twelve hours earlier costs fifty minutes of sleep. Those are different doses, timings and outcomes. This small study tested individual nights in young men, not every age, medical circumstance or coffee habit. A study can reveal a pattern without handing you a personalized curfew.
An earlier 2013 crossover experiment by Drake and colleagues tested 400 milligrams at bedtime, three hours before and six hours before in twelve healthy sleepers. The home sleep monitor recorded less sleep at all three timings. At six hours, participants’ own sleep diaries did not identify a statistically significant reduction. This was a substantial single dose in a very small study, but it offers a useful caution: “I can fall asleep after coffee” does not settle the question of what happens through the rest of the night.
You may have seen an impressively precise recommendation to stop coffee 8.8 hours before bed. That number came from a statistical model in Gardiner and colleagues’ 2023 systematic review and meta-analysis of 24 studies. It estimated timing for a drink containing 107 milligrams of caffeine. It was not a trial in which everybody crossed a magical line at eight hours and forty-eight minutes. The underlying studies used different doses and methods. The newer dose-and-timing experiment also shows why the neatest number is not necessarily the whole story.
For an ordinary workweek, begin with something less theatrical than declaring war on the coffee machine. Write down the time and approximate caffeine amount of your usual drinks for a few days, along with when you intend to sleep. Use the product label or the maker’s information when available. Include tea, energy drinks and caffeinated supplements rather than assigning coffee responsibility for the entire household. This is a practical way to see the pattern, not a home diagnostic test.
The FDA’s caffeine guidance emphasizes that products vary and people differ in sensitivity and how quickly they clear caffeine. Its general adult daily guidance is not a promise that a given amount will leave sleep untouched. Decaf contains much less caffeine but is not necessarily caffeine-free. If you regularly use caffeine and want to reduce it, a gradual change can make withdrawal less unpleasant. Medication use, pregnancy and relevant medical conditions deserve a conversation with your clinician about an appropriate amount.
Once you know the pattern, choose one manageable adjustment: make the later drink smaller, move it earlier, or replace it with a caffeine-free option. Keep the rest of your routine reasonably similar while you notice what happens over several nights. This is a personal observation exercise, not a validated treatment protocol. If you change six things at once, you may feel better but have very little idea which change helped. Curiosity is more useful than a courtroom case against your latte.
Think relative to your intended sleep time rather than copying someone else’s wall-clock deadline. A person who sleeps at nine and a person who works evenings are not asking the same question. Neither are a habitual small-coffee drinker and somebody taking a large pre-workout dose. If your schedule is irregular, start by noticing the gap between the last caffeine and each main sleep period; do not force a daytime-worker rule onto a night shift.
The Biology
Sleep is influenced by both the pressure that builds with time awake and the timing of your internal clock. Adenosine is one part of that sleep-pressure system. Caffeine blocks adenosine receptors, interfering with part of the signal rather than removing the need for sleep. The NHLBI’s explanation of the sleep–wake cycle distinguishes this pressure from circadian timing. Feeling more alert is useful, but feeling less sleepy is not the same as having had enough sleep.
That distinction belongs alongside the wider Light & Sleep foundation. Caffeine is one thing to examine, not the explanation for every difficult night. The broader timing story in Your Body Knows What Time It Is helps put a single habit back into the day around it. Persistent sleep difficulty or substantial daytime sleepiness deserves assessment rather than an endless series of beverage experiments.
Key Takeaway
Look at the amount and timing of your later caffeine before searching for another bedtime fix. Make one realistic change, notice the pattern and keep enough opportunity for sleep in the plan. The goal is not to win an argument about coffee. It is to stop asking tonight’s sleep to negotiate with this afternoon’s drink.
Research & References
- Gardiner CL, Weakley J, Burke LM, et al. (2025; published online 2024). Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep, 48(4), zsae230.
- Drake C, Roehrs T, Shambroom J, Roth T. (2013). Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 9(11), 1195–1200.
- Gardiner C, Weakley J, Burke LM, et al. (2023). The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews, 69, 101764.
- U.S. Food and Drug Administration. Spilling the Beans: How Much Caffeine is Too Much? Accessed November 2, 2026.
- National Heart, Lung, and Blood Institute. (2022). How Sleep Works: Your Sleep/Wake Cycle.