Coffee is one of life's small pleasures, and for most people there is no need to give it up to sleep well. What matters far more than whether you drink caffeine is when you drink it. Get the timing right and an afternoon cup need not cost you a good night.
Here is a calm, evidence-led look at how caffeine affects sleep, how late is genuinely too late, and the gentle wind-down habits that help your body settle once the last cup is done.
Quick answer
As a general rule, stop drinking caffeine at least six hours before bed, and ideally by early afternoon. In a controlled study, 400mg of caffeine, roughly two to three cups of coffee, taken six hours before bed still reduced total sleep time by more than an hour, even when people did not notice the disruption themselves (Drake et al., Journal of Clinical Sleep Medicine, 2013). If you go to bed around 11pm, that points to a cut-off around 3pm to 5pm. Because sensitivity to caffeine varies widely, the more sensitive you are, the earlier you should stop.
How caffeine actually affects sleep
To time caffeine well, it helps to understand what it does inside the body.
It blocks your "sleepy" signal
Throughout the day, a chemical called adenosine gradually builds up in the brain. Rising adenosine is part of what creates "sleep pressure", the growing urge to sleep that peaks at bedtime. Caffeine works by blocking the receptors that adenosine would normally bind to. The tiredness signal is still there, but caffeine masks it, which is why a coffee makes you feel alert even when your body is genuinely tired.
It lingers for hours
The reason afternoon coffee matters is that caffeine leaves the body slowly. Its half-life, the time it takes for half a dose to clear, is commonly around five to six hours, though it ranges widely between individuals. If you drink a strong coffee at 4pm, a meaningful portion of that caffeine is still circulating at 10pm. So even if you fall asleep, caffeine can lighten your sleep and reduce the deep, restorative stages without you realising.
You may not feel the disruption
One of the most striking findings of the 2013 research was that people underestimated the effect. Their sleep was measurably shorter and more broken, yet they did not report feeling that their sleep had suffered. This is worth remembering if you assume caffeine "does not affect" you: it may simply be affecting you quietly.
How much caffeine is in what you drink
Timing is only half the picture. Dose matters too, and it is easy to underestimate. Approximate amounts in common UK drinks:
| Drink | Approx. caffeine |
|---|---|
| Brewed or filter coffee (mug) | Around 90 to 120mg |
| Instant coffee (mug) | Around 60 to 80mg |
| Black tea (mug) | Around 30 to 50mg |
| Green tea (mug) | Around 25 to 40mg |
| Cola (can) | Around 30 to 40mg |
| Energy drink (250ml) | Around 80mg or more |
| Plain dark chocolate (50g) | Around 25mg |
The NHS advises that most healthy adults can safely have up to around 400mg of caffeine a day. The point is not to fear caffeine, but to notice how a late-afternoon flat white plus a square of dark chocolate can quietly add up close to bedtime.

Finding your personal cut-off time
The six-hour guideline is a sensible default, but caffeine sensitivity is genuinely personal. Genetics, age, whether you smoke, some medications and pregnancy all change how quickly you clear it. Here is how to find the cut-off that suits you.
- Start from your bedtime. Count back six hours for a first cut-off. For an 11pm bedtime, that is 5pm.
- Move it earlier if sleep is fragile. If you fall asleep fine but wake in the night or feel unrefreshed, try stopping by 2pm for a week and compare.
- Watch the hidden sources. Green tea, cola, some painkillers and pre-workout supplements all carry caffeine.
- Swap, do not just stop. A warm decaf, a herbal tea or simply water can keep the ritual of an evening drink without the stimulant.
If you often lie awake with a busy mind rather than feeling physically wired, caffeine may not be the only factor. Our guide to why you wake up at 3am and what your body is doing looks at the other things at play.
What to do once the last cup is done
Timing caffeine is one lever. The hours before bed are another. A calmer wind-down helps your natural sleep pressure take over from the point caffeine stops masking it.
Small, repeatable signals work best: dimming the lights an hour before bed, stepping away from screens, and keeping a consistent bedtime so your body clock knows what to expect. Our guide to creating a sleep routine and our five simple switches for better sleep both offer gentle starting points.
The environment matters too. A cool, calm bedroom and breathable bedding make it easier to drift off and stay asleep once the caffeine has cleared. Naturally temperature-regulating fabrics, such as those in our bamboo bedding collection, help the body settle rather than overheat through the night, which supports the deeper stages of sleep described in our overview of sleep stages and why deep sleep matters.
Frequently asked questions
What time should I stop drinking coffee to sleep well?
Aim to have your last caffeinated drink at least six hours before bed, and ideally by early afternoon. For an 11pm bedtime that means a cut-off between roughly 3pm and 5pm. If you are sensitive to caffeine or a light sleeper, stopping at lunchtime often works better.
How long does caffeine stay in your system?
Caffeine has a half-life of around five to six hours on average, meaning half of it is still active five to six hours after you drink it. It can take much longer to clear fully, and the exact time varies a lot from person to person.
Does caffeine affect sleep even if I fall asleep easily?
Yes. Research shows caffeine can shorten total sleep time and reduce deep sleep even when people fall asleep normally and do not notice any problem. Falling asleep is not the same as sleeping well.
Is decaf coffee fine before bed?
Decaf is a good option for keeping the ritual of an evening drink, though it is not completely caffeine free. A cup of decaf typically contains only a few milligrams, which is low enough not to trouble most people close to bedtime.
Why can some people drink coffee at night and sleep fine?
Caffeine metabolism is largely genetic, so some people clear it much faster than others. Age, smoking and certain medications also play a part. Even fast metabolisers can experience lighter sleep without realising it, so it is worth testing your own response rather than assuming.
Set the scene for a calmer night
