Coffee can make it harder to fall asleep, shorten sleep and reduce deep sleep because caffeine blocks signals involved in feeling sleepy. Timing and dose both matter: NHS advice is to avoid tea and coffee for at least 6 hours before bed, but an earlier cut-off may suit people whose sleep remains disturbed.
In short
- Caffeine wears off gradually. EFSA gives an average adult half-life of approximately 4 hours, with a range of 2 to 8 hours.
- A controlled study found that 400 mg taken 6 hours before bedtime reduced objectively measured sleep by more than an hour.
- Falling asleep easily does not prove that caffeine has left sleep unchanged.
- If sleep is troublesome, try moving your last caffeine to around 8 to 9 hours before bed, then adjust according to your response.
- Decaf substantially reduces caffeine exposure, but it is not necessarily caffeine-free.
How coffee affects sleep
Caffeine acts mainly by blocking adenosine receptors, the docking points through which adenosine sends signals in the brain. Adenosine is involved in sleep pressure, the growing drive to sleep during waking hours.
Blocking that signal can make you feel more alert without removing the underlying need for sleep. Coffee is therefore better understood as temporarily masking sleepiness than as replacing rest.
The effects are not limited to lying awake at bedtime. Studies also measure awakenings, total sleep duration and sleep stages, including slow-wave sleep, commonly called deep sleep. Someone who drops off readily may still have a shorter or more fragmented night.
This is one part of the broader relationship between coffee and health. Here, the useful question is not simply whether coffee is healthy overall, but whether your amount and timing leave your sleep intact.

Caffeine half-life: why afternoon coffee can linger
Half-life means the time needed for the amount of a substance in the body to fall by half. It does not mean the time until the substance has disappeared.
EFSA’s public explanation gives an average caffeine half-life of approximately 4 hours in healthy adults, with a range of 2 to 8 hours. This is a population estimate, not a personal countdown: pregnancy, medicines and liver health can affect clearance.
Consider a deliberately simplified example:
- Assume a single dose of 100 mg at 15:00.
- Assume a constant half-life of 4 hours, with no further caffeine.
- Approximately 50 mg would remain at 19:00.
- Approximately 25 mg would remain at 23:00.
The calculation is remaining caffeine = starting dose × ½ raised to the number of half-lives elapsed. These figures illustrate elimination, not a threshold below which sleep is guaranteed to be unaffected.
Several coffees complicate the picture because each dose has its own remaining fraction. Count tea, cola, energy drinks, chocolate, supplements and caffeine-containing medicines too. Coffee strength and serving size also vary, so “two cups” is not a precise caffeine measurement.
What sleep studies actually show
Controlled studies are especially useful here because they can compare caffeine with a placebo, rather than simply observing that coffee drinkers report different sleep.
The six-hour study
Drake and colleagues’ 2013 study in the Journal of Clinical Sleep Medicine tested 400 mg of caffeine at bedtime, 3 hours before bed and 6 hours before bed in 12 healthy sleepers.
Even at 6 hours, objectively measured total sleep time fell by more than an hour compared with placebo. Deep-sleep duration also fell significantly in that condition.
However, this was a small study using a substantial single dose and a portable sleep monitor. It does not establish that every afternoon coffee removes an hour of sleep. Participants’ diaries also did not fully reflect the objectively measured disruption.
The wider evidence
Gardiner and colleagues’ 2023 systematic review and meta-analysis combined 24 studies. Across the included conditions, caffeine reduced total sleep time by an average of 45 minutes and deep sleep by about 11 minutes.
These are pooled averages across differing doses and timings, not predictions for a particular drinker. The researchers also modelled a cut-off of 8.8 hours before bedtime for a coffee containing 107 mg of caffeine in 250 ml. That figure is a model-based estimate, not a universal deadline or a standard caffeine content for all coffee.
Why dose changes the answer
A trial published online in 2024 and in a 2025 issue of Sleep compared 100 mg and 400 mg at different intervals before bedtime in 23 men.
It detected no significant sleep effect from 100 mg, including 4 hours before bed, but found disruption from 400 mg even at earlier timings. A small, male-only trial cannot establish a universally harmless dose.
These findings do not simply contradict the earlier research. They show why dose, participant characteristics and measurement methods matter.
| Claim | Type of evidence | Strength and limitation | Source |
|---|---|---|---|
| Caffeine can shorten sleep and reduce deep sleep | Systematic review and meta-analysis | Strong overall direction; individual effects vary | Gardiner et al., 2023 |
| A large dose can disturb sleep 6 hours later | Placebo-controlled crossover trial | Direct experimental evidence, but only 12 participants | Drake et al., 2013 |
| Smaller and larger doses can have different effects | Randomised crossover trial | Direct evidence, but a small male-only sample | Gardiner et al., 2025 |
| Some adults’ sleep is affected by 100 mg near bedtime | Scientific risk assessment | Authoritative population guidance, not a personal threshold | EFSA, 2015 |
“Strength” here is an editorial summary, not a formal evidence-grading assessment.
Choosing a coffee cut-off time
Start with your intended bedtime, rather than an arbitrary rule such as “no coffee after lunch”. Someone planning to sleep after a night shift needs a different clock-time cut-off from someone going to bed in the evening.
The NHS recommends avoiding tea and coffee for at least 6 hours before bed. For a 23:00 bedtime, that means stopping by 17:00. This is a useful starting rule, not a promise that any amount before then will leave sleep unaffected.
If you already struggle with sleep, a cautious practical trial is to stop caffeine around 8 to 9 hours before bedtime. For 23:00, that means approximately 14:00 to 15:00. This suggestion draws on the meta-analysis, rather than representing a separate NHS recommendation.
Use a simple comparison:
- Record your usual pattern. Note drinks, approximate caffeine where available, bedtime, awakenings and next-day sleepiness.
- Move the last caffeine earlier. Avoid replacing the afternoon coffee with caffeinated tea or an energy drink.
- Keep other routines reasonably consistent. A changing bedtime makes comparison harder.
- Review several nights, not just one. Look for a pattern rather than treating one unusually good or poor night as proof.
- Adjust again if needed. Try morning-only caffeine or less total caffeine if an earlier cut-off makes little difference.
This is a practical self-observation method, not a diagnostic test. Do not deliberately take a large dose to discover your tolerance.
Why people respond differently
Two people can drink the same coffee and have different nights. The rate of caffeine clearance matters, but so does sensitivity to its effects.
Human research links variation in ADORA2A, a gene involved in the adenosine A2A receptor, with differences in caffeine-related sleep responses. That supports biological variation, not the idea that a single genetic result can prescribe an exact coffee timetable.
Feeling accustomed to coffee is not proof of complete protection either. The dose-and-timing trial included habitual caffeine consumers, yet the larger dose still disrupted sleep.
Anxiety can also be relevant when assessing a restless evening. If coffee leaves you tense or mentally over-alert, read coffee and anxiety alongside your sleep notes rather than assuming timing is the only consideration.
Pregnancy needs separate attention. The NHS advises no more than 200 mg of caffeine daily from all sources, and pregnancy can prolong caffeine clearance. See coffee during pregnancy, and ask a midwife, GP or pharmacist about individual circumstances or medicines.
Decaf and the evening coffee habit
Decaf is a useful way to retain the taste and routine of coffee while substantially reducing caffeine. It should not, however, be described as automatically caffeine-free or as a sleep treatment.
McCusker and colleagues’ laboratory analysis found residual caffeine in decaffeinated coffees, with differences between samples. Those measurements were from particular US drinks, not a current specification for every UK decaf.
For most practical decisions, the distinction is straightforward: decaf reduces exposure, while avoiding caffeine altogether removes uncertainty about residual caffeine. If you are particularly sensitive, check any manufacturer information and consider moving decaf earlier too.
When reducing a regular caffeine habit, make the change gradually. Withdrawal can bring headaches and low energy, which can otherwise make the first days of a sleep experiment misleading.
At work, providing clearly distinguished caffeinated and decaffeinated choices makes it easier for colleagues to follow their own cut-offs. Do not assume everyone wants an afternoon stimulant.
When changing coffee is not enough
Caffeine is one possible contributor to poor sleep, not an explanation for every disturbed night. The NHS also lists stress, anxiety, noise, temperature, shift work and other health conditions among possible causes.
Speak to a GP if changing sleep habits has not helped, problems have lasted for months, or poor sleep is affecting your ability to cope with daily life. Cognitive behavioural therapy may be offered for insomnia.
The practical aim with coffee and sleep is to find an amount and timing that do not undermine rest, rather than to reach a supposedly acceptable daily maximum.
FAQ
Does staying below 400 mg guarantee good sleep?
No, a general caffeine safety benchmark is not a sleep guarantee. EFSA’s 2015 assessment found no safety concerns for healthy non-pregnant adults consuming up to 400 mg throughout the day, but also noted that 100 mg close to bedtime can affect some adults’ sleep. These are population benchmarks, not targets or individual allowances.
Does adding milk make evening coffee less stimulating?
Adding milk does not remove the caffeine already in the coffee. If the drink contains the same coffee portion, adding milk changes its volume rather than cancelling that caffeine dose. For a sleep-focused change, choose less caffeinated coffee, switch to decaf or move the drink earlier, rather than relying on milk.
Can I catch up on sleep by having more coffee the next morning?
Coffee may make you feel more alert, but it does not replace the sleep you missed. Using additional caffeine after a poor night can also complicate the following night if the dose is large or late. Treat persistent daytime sleepiness as a reason to review sleep and seek advice when needed, rather than continually increasing caffeine.
Where to go next
Read Coffee and Health for the wider evidence, and Coffee and Anxiety if restlessness accompanies your sleep problems. Coffee During Pregnancy explains the separate guidance that applies when pregnant.
Sources
- European Food Safety Authority. EFSA explains risk assessment: Caffeine (2015).
https://www.efsa.europa.eu/sites/default/files/corporate_publications/files/efsaexplainscaffeine150527.pdf - European Food Safety Authority. Caffeine, current topic page summarising the 2015 scientific opinion.
https://www.efsa.europa.eu/en/topics/topic/caffeine - NHS. Insomnia (reviewed 2024).
https://www.nhs.uk/conditions/insomnia/ - NHS. Foods to avoid in pregnancy, current guidance.
https://www.nhs.uk/pregnancy/keeping-well/foods-to-avoid/ - Drake C, Roehrs T, Shambroom J and Roth T. Caffeine Effects on Sleep Taken 0, 3, or 6 Hours before Going to Bed. Journal of Clinical Sleep Medicine (2013), 9(11). Full article retrieved as a hosted PDF.
- Gardiner C and colleagues. The effect of caffeine on subsequent sleep: A systematic review and meta-analysis. Sleep Medicine Reviews (2023), 69.
https://pubmed.ncbi.nlm.nih.gov/36870101/ - Gardiner CL and colleagues. Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. Sleep (2025 issue; published online 2024).
https://pmc.ncbi.nlm.nih.gov/articles/PMC11985402/ - Rétey JV and colleagues. A genetic variation in the adenosine A2A receptor gene (ADORA2A) contributes to individual sensitivity to caffeine effects on sleep. Clinical Pharmacology & Therapeutics (2007), 81(5).
https://pubmed.ncbi.nlm.nih.gov/17329997/ - McCusker RR and colleagues. Caffeine content of decaffeinated coffee. Journal of Analytical Toxicology (2006), 30(8).
https://pubmed.ncbi.nlm.nih.gov/17132260/ - Lancashire Teaching Hospitals NHS Foundation Trust. The benefits of switching to decaffeinated tea and coffee (February 2025), JR 1251 v1.
https://www.lancsteachinghospitals.nhs.uk/media/.leaflets/67bf1e2c45fb56.11663595.pdf
Research combined retrieved NHS and EFSA guidance with controlled sleep studies, an original meta-analysis and laboratory caffeine measurements, distinguishing measured findings from practical suggestions.
Last checked: November 2026