A cup of coffee on a table - understanding caffeine timing for better sleep

Caffeine and Sleep: What the Science Says

Caffeine has a half-life of roughly 5 to 7 hours, which means a coffee at 3pm still has half its caffeine floating around your brain at 8 or 10pm. That single fact explains why afternoon caffeine messes with sleep even when you think you fall asleep fine. This guide breaks down what the research actually says, when to draw the line, and what to reach for instead.

๐Ÿ”‘ Key Takeaways

  • Caffeine's half-life is 5-7 hours - a 200mg coffee at 2pm leaves roughly 100mg in your system at 7-9pm
  • Stop at least 6 hours before bed - a 2013 study found even a 6-hour gap cut total sleep by over an hour
  • You often don't notice the damage - a 2024 study showed people underestimate how much caffeine disrupts their sleep
  • 400mg is the daily max - that's about four cups of coffee, counting tea, chocolate and energy drinks too

๐Ÿ“š Suggested Reading: Magnesium for Sleep: What the Science Says ยท How to Fall Asleep Fast

What Caffeine Actually Does to Your Brain

Caffeine works by blocking adenosine receptors in your brain. Adenosine is the chemical that builds up throughout the day and makes you feel sleepy. When caffeine sits in those receptors, adenosine can't bind, so you feel alert even when your body is ready to rest. The problem is that adenosine keeps building up behind the blockage. Once the caffeine wears off, all that accumulated adenosine hits at once, which is why the crash feels so heavy.

Caffeine also triggers a small release of adrenaline, which raises your heart rate and keeps your nervous system on alert. And it suppresses melatonin production, the hormone that tells your body it is nighttime. A 2013 study in the Journal of Clinical Sleep Medicine found that 400mg of caffeine taken 6 hours before bedtime still reduced total sleep time by more than one hour. That is not a subtle effect.

The Half-Life Math

Half-life means how long it takes your body to clear half the caffeine. For most healthy adults that window is 5 to 7 hours, though genetics play a role. People who metabolise caffeine slowly (roughly half the population) can have a half-life closer to 8 or 9 hours.

Here is what that looks like for a standard 200mg cup of coffee:

Even at 25mg, that is enough to lighter your sleep and reduce deep sleep stages. A 2025 meta-analysis in Sleep Medicine Reviews confirmed that caffeine disrupts multiple sleep parameters, with stronger effects in younger adults and at higher doses. The takeaway: "I can fall asleep after coffee" does not mean caffeine is harmless to your sleep.

When to Stop Drinking Caffeine

The research consensus is straightforward: stop caffeine at least 6 hours before your target bedtime. Ideally, aim for 8 to 10 hours if you can manage it. If you go to bed at 10pm, your last caffeinated drink should be no later than 4pm, and 2pm is safer.

A 2024 randomised crossover trial published in Sleep examined caffeine consumed at different times and found that evening caffeine (even at moderate doses) significantly reduced sleep quality. The study also found that participants consistently underestimated how much caffeine was disrupting their sleep. You might feel like you slept fine, but your deep sleep and total sleep time tell a different story.

The NHS does not publish a specific cutoff time, but its general guidance recommends avoiding caffeine in the evening. The European Food Safety Authority sets the safe daily limit at 400mg for healthy adults, counting all sources: coffee, tea, energy drinks, chocolate and some medications.

Caffeine Sources You Might Not Expect

Most people know coffee and energy drinks contain caffeine, but several common items carry more than you would think. A standard cup of black tea has 40 to 70mg. Green tea has 20 to 45mg. A bar of dark chocolate can have 20 to 30mg. Even some painkillers, like paracetamol with codeine formulations, contain caffeine as an ingredient.

Decaf coffee is not completely caffeine-free either. A typical cup of decaf has 2 to 15mg, compared to 80 to 200mg in regular coffee. For most people that amount is too small to affect sleep, but if you are in the slow-metaboliser camp, it is worth knowing.

Energy drinks are the worst offenders for hidden timing. A 250ml can of Monster has about 80mg, while a 500ml can of Red Bull has around 160mg. If you grab one at 4pm on a workday, you are still carrying a significant dose at midnight.

How to Cut Back Without the Headache

If you currently drink three or four cups a day and want to pull back, going cold turkey gives you a headache. Caffeine withdrawal is real and peaks 1 to 2 days after you stop. The smart move is to taper gradually: cut one cup every three to four days, and replace it with something that is not caffeinated.

Switching to half-caff is another option. Several UK supermarkets sell blends that are 50% decaf, which halves your intake without changing the ritual. Lavazza Decaffeinato is one of the better-tasting supermarket decafs, with a smooth flavour that does not taste like an afterthought. Kenco Decaf is another solid option if you want something milder.

The goal is not to eliminate caffeine entirely. It is to move your last caffeinated drink far enough from bedtime that it has time to clear. Most people feel a noticeable difference in sleep quality within a week of shifting their cutoff earlier.

What to Drink Instead in the Afternoon

The hardest part of cutting afternoon caffeine is not the chemistry, it is the habit. You reach for a cup because it is 3pm and you are tired, not because you are thirsty. Having an alternative ready makes the switch easier.

Chamomile tea is the classic sleep-friendly option. It contains apigenin, a compound that binds to the same GABA receptors that help calm the nervous system. Pukka Night Time Tea blends chamomile with oat flower and valerian for a stronger bedtime effect. For something lighter during the day, Twinings Camomile is widely available and gentle.

If you prefer something floral, Clipper Organic Chamomile is a solid budget pick that brews smooth without bitterness. For a blend specifically designed for bedtime, Heath & Heather Night Time Tea combines chamomile, lemon balm and passiflora.

Warm milk works better than it sounds. Milk contains tryptophan, which your body converts to melatonin. It is not a miracle, but the combination of warmth and the amino acid does help some people wind down. Tart cherry juice is another option with actual research behind it: a small study found it increased sleep time by 84 minutes.

If you want to tackle sleep quality from multiple angles, our magnesium guide covers how that supplement supports the same GABA pathways. And the 10-3-2-1-0 rule is a simple evening framework that includes the caffeine cutoff as one of its steps.

Frequently Asked Questions

How long does caffeine stay in your system?

Caffeine has a half-life of roughly 5 to 7 hours in healthy adults. That means if you drink a 200mg coffee at 2pm, about 100mg is still circulating at 7-9pm. It can take 10 to 14 hours for caffeine to fully clear your body.

What time should I stop drinking coffee for better sleep?

The research says at least 6 hours before bedtime, and ideally 8 to 10 hours. If you go to bed at 10pm, your last caffeinated drink should be no later than 4pm. A 2013 study in the Journal of Clinical Sleep Medicine found that 400mg of caffeine taken even 6 hours before bedtime reduced total sleep time by over an hour.

Does decaf coffee have caffeine?

Yes, decaf still contains small amounts of caffeine, typically 2 to 15mg per cup compared to 80 to 200mg in regular coffee. For most people this amount is too small to affect sleep, but if you are particularly sensitive, it is worth knowing.

Can caffeine affect your sleep even if you fall asleep fine?

Yes. A 2024 study in the journal Sleep found that people often do not notice the sleep disruption caffeine causes. You might fall asleep on time but spend less time in deep sleep, wake more often during the night, and feel less rested the next morning without realising caffeine is the reason.

How much caffeine is safe per day?

The European Food Safety Authority recommends a maximum of 400mg per day for healthy adults, which is roughly four standard cups of coffee. Pregnant women should limit intake to 200mg. These are daily totals from all sources, including tea, chocolate and energy drinks.

What can I drink instead of coffee in the afternoon?

Herbal teas like chamomile or peppermint are naturally caffeine-free. Decaf coffee gives you the ritual without most of the caffeine. Warm milk, tart cherry juice or a magnesium drink are other options some people find helpful for winding down.

The Bottom Line

Caffeine is one of the easiest sleep disruptors to fix, because the solution is just timing. You do not have to give up coffee. You just have to stop drinking it far enough from bedtime that your body has time to clear it. Aim for at least 6 hours before bed, and if you want to be thorough, make it 8.

Start by noting what time you usually have your last caffeinated drink, then shift it two hours earlier for a week. Most people notice they fall asleep faster and wake up feeling more rested within a few days. If you want to track the difference, a simple sleep diary or a basic tracker like a fitness tracker with sleep tracking makes the improvement visible.

For more sleep guides, visit SleepReview.

Related Articles

๐Ÿ“Š

About the Author

Tom Richards - Sleep Technology Writer, Cambridge

Tom Richards is a software engineer and self-described data nerd from Cambridge. He writes about what the data and the studies actually say about sleep habits, supplements and technology.

โš ๏ธ Medical Disclaimer

The information in this article is for general informational purposes only and should not be considered medical advice. If you have persistent sleep problems, anxiety, heart conditions, or you are pregnant or breastfeeding, please consult your GP or a qualified healthcare professional.

๐Ÿ“‹ Affiliate Disclosure

Some of the links on this page are affiliate links, which means we may earn a commission if you make a purchase through them - at no additional cost to you. This helps support our work creating free, independent sleep content. We only recommend products we genuinely believe in and have thoroughly evaluated. Our editorial integrity is never compromised by affiliate relationships.

Last reviewed: 2026-08-17 ยท Evidence-based content