This is the one piece of caffeine research with an immediate, concrete, actionable answer, and it is also the one most people ignore because it contradicts their own sense of how they sleep. The finding is simple: caffeine damages sleep much later into the day than almost anyone assumes, and you are not reliably able to tell that it is happening.
The trial
Drake and colleagues, publishing in the Journal of Clinical Sleep Medicine in 2013[1], ran a double-blind, placebo-controlled study on 12 healthy normal sleepers. Each participant received a fixed 400 mg dose of caffeine, roughly the amount in four cups of brewed coffee, at one of three times: at bedtime, 3 hours before bedtime, and 6 hours before bedtime. Sleep was recorded at home, both by self-report and by objective monitoring.
The design is the important part. Because each participant served as their own control across conditions, and because a placebo was included and neither participants nor researchers knew which was which, this is a genuine experiment rather than a survey. That places it in a much stronger evidential category than most of the research in this section.
The result
All three timings produced significant sleep disturbance relative to placebo. That includes the 6-hour condition, which was the surprise. Objectively measured total sleep time was reduced by more than one hour when caffeine was taken 6 hours before bed.
An hour is not a rounding error. It is the difference between adequate sleep and chronic mild deprivation, repeated nightly. The authors concluded that the magnitude of reduction provided empirical support for sleep hygiene recommendations to avoid substantial caffeine for a minimum of 6 hours before bedtime.
The part that explains why nobody believes it
The most consequential detail in the study is the mismatch between measured and perceived sleep. Participants' subjective assessments did not reliably capture the disruption that the objective monitoring recorded. People who had lost an hour of sleep did not consistently report having slept badly.
Why the effect is invisible from the inside
It is worth understanding why self-assessment fails so badly here, because it is not simply that people are careless. Caffeine works by blocking adenosine receptors, and adenosine is one of the main signals producing sleep pressure, the accumulating sense of tiredness that builds across a waking day. Blocking those receptors does not clear the adenosine; it prevents you registering it.
That means caffeine degrades sleep while simultaneously suppressing the feeling that would tell you your sleep had been degraded. The disruption also shows up largely in sleep architecture and total duration rather than as the obvious experience of lying awake unable to drop off. Someone can fall asleep quickly, feel they slept normally, and still have lost an hour of measured sleep and a disproportionate share of their deep sleep.
This is also why the loop is self-sustaining. Poor sleep produces afternoon fatigue, afternoon fatigue produces afternoon caffeine, and afternoon caffeine produces poor sleep. People inside that loop generally report that coffee does not affect their sleep, which is precisely what the trial found people report.
What a half-life of five hours actually implies
Working the pharmacology forward is a useful exercise, because the numbers are less forgiving than intuition suggests. Caffeine's half-life in healthy adults averages roughly five hours, so half remains after five hours, a quarter after ten, an eighth after fifteen.
Take a 200 mg coffee at 3pm. By 8pm about 100 mg remains, which is roughly a full cup's worth. By 1am, around 50 mg, more than a can of cola. For someone going to bed at 10pm, that afternoon coffee is delivering the equivalent of most of a fresh cup at bedtime.
And five hours is only an average. Nehlig's review[2] documents half-lives ranging from around two hours in the fastest metabolisers to eight or more in the slowest, with smoking accelerating clearance substantially, and oral contraceptives and pregnancy slowing it considerably. A slow metaboliser taking the contraceptive pill can plausibly still have meaningful caffeine circulating from a mid-afternoon coffee well past midnight.
This single finding dismantles the most common objection to caffeine and sleep advice, which is some version of: I drink coffee at 6pm and I sleep fine. What the trial indicates is that sleeping fine is not something people can accurately self-assess under caffeine. The disruption is real, measurable, and largely invisible from the inside. If you have never measured your sleep, your confidence that evening coffee does not affect you is not evidence.
There is independent support for this from a completely different study design. The CRAVE trial[3] randomised 100 adults to drink caffeinated coffee or avoid caffeine on given days over two weeks, with sleep tracked by wrist-worn accelerometer. Participants slept 397 minutes on coffee days versus 432 minutes on caffeine-free days, a mean difference of about 36 minutes a night. A different population, a different measurement method, real-world coffee rather than a capsule, and the same direction of effect.
The pharmacology behind it
Caffeine has a half-life in healthy adults of roughly five hours, meaning that five hours after your cup, about half the caffeine is still circulating. Work that forward from a single strong afternoon coffee. A 200 mg dose at 3pm leaves roughly 100 mg in your system at 8pm and roughly 50 mg at 1am. Fifty milligrams is not nothing; it is more than a can of cola.
That five-hour figure is an average concealing enormous individual variation. Nehlig's review in Pharmacological Reviews[2] documents how widely caffeine metabolism differs between people, driven substantially by variation in the CYP1A2 enzyme, and also by smoking, which accelerates clearance, by oral contraceptives and pregnancy, which slow it dramatically, and by liver function. Half-life ranges reported in the literature run from around two hours in fast metabolisers to eight or more in slow ones. We cover this in detail in our article on caffeine genetics.
This variation is the reason blanket rules fail and why a friend's tolerance tells you nothing about your own. A slow metaboliser drinking coffee at 2pm may still have substantial caffeine on board at midnight.
Why the mechanism makes this hard to feel
Caffeine works by blocking adenosine receptors. Adenosine accumulates in the brain across your waking hours and is one of the main signals producing sleep pressure, the growing sense of tiredness that makes it easy to fall asleep. Blocking those receptors does not remove the adenosine; it just stops you perceiving it.
That distinction is why the effect is deceptive. You are not less tired, you are less aware of being tired. And it explains why caffeine can shorten and fragment sleep without producing the subjective experience of lying awake, since the disruption shows up in sleep architecture and total duration rather than as obvious insomnia.
The practical version
Take your usual bedtime and subtract at least six hours. That is your last-coffee time, and it is the direct implication of the trial. For someone sleeping at 10pm, that means no substantial caffeine after 4pm, which for many people means the afternoon merienda coffee is already too late.
Set an alarm for it if you need to.
Most people find the first week noticeably harder than the second, and then stop thinking about it.
For someone in Metro Manila keeping fairly typical hours, sleeping around 11pm, that puts the cutoff at 5pm. The afternoon merienda coffee, which lands somewhere between 3pm and 4pm for most people, is right at the boundary and a second one after it is over the line.
A few adjustments. If you suspect you are a slow metaboliser, because coffee affects you strongly or lasts a long time, extend the window to eight hours or more. If you are pregnant or taking oral contraceptives, caffeine clearance slows considerably, so extend it as well. If you want to test rather than guess, move your cutoff two hours earlier for a fortnight and pay attention to how you feel on waking rather than to how you think you slept.
Testing it on yourself properly
Given that self-report is demonstrably unreliable here, the only way to know your own answer is to measure something. Three approaches work, in ascending order of effort.
None of these are rigorous science. They are considerably better than asking yourself whether you think coffee affects your sleep, which the trial showed is the one method that does not work.
The crudest is to track how you feel on waking rather than how you think you slept, over two two-week blocks with different cutoff times. Morning grogginess is a poorer signal than a sleep tracker but a better one than your impression of the night before, because it is assessed after the fact rather than during.
Whichever you choose, change one variable at a time and give it at least a fortnight. Sleep is noisy enough night to night that a three-day experiment tells you nothing.
The payoff, if there is one, is an hour a night.
The second is any wrist-worn tracker. Consumer devices are imprecise about sleep stages and reasonably good at total sleep time and wake episodes, which are exactly the measures the trial found caffeine affecting. Two weeks with a 4pm cutoff against two weeks with an 8pm cutoff will usually produce a visible difference if there is one.
The third, and the most informative, is to notice how long it takes you to fall asleep and how often you wake, since fragmentation rather than difficulty falling asleep is the more common caffeine signature. If you fall asleep quickly and still wake unrefreshed, an afternoon cutoff is worth testing before concluding that you simply need more hours.
It is also worth knowing that afternoon coffee is often a symptom rather than a cause. Poor sleep produces afternoon fatigue, which produces afternoon caffeine, which produces poor sleep. Breaking that loop generally requires moving the caffeine, not adding more of it. And if quitting entirely is what you are considering, read our article on caffeine withdrawal first, because the headaches are real and predictable.
One more practical note: decaf is a genuinely useful tool here and an underused one. It preserves the ritual, the warmth and the taste of an afternoon coffee while removing the part that costs you sleep, and as the mortality research covered in our lifespan article found, decaf carries much the same favourable health associations as caffeinated coffee.
The summary
A controlled trial found that 400 mg of caffeine 6 hours before bed cut objectively measured sleep by more than an hour, while participants failed to notice. A separate randomised trial using ordinary coffee found a 36-minute nightly loss. Caffeine's roughly five-hour half-life varies enormously between individuals, so the sensible default is a minimum six-hour gap before bed, extended if you are a slow metaboliser. This is one of the few pieces of coffee research solid enough and specific enough to act on directly, and one of the least followed. For the practical side of building a coffee routine, see our beginner's guide.
If you take nothing else from this section, take the cutoff time.
Why this is the most actionable finding in the section
Almost everything else in this section is an observational association that should change what you find interesting and not what you do. This one is different in three ways worth naming.
It came from a randomised, placebo-controlled experiment rather than a survey, so confounding is not the issue it is elsewhere. The effect size is large in a way anyone would notice if they could perceive it, since an hour of sleep is not a marginal quantity. And the intervention is free, immediate and entirely reversible: move your last cup earlier and see what happens.
Set against that, the compliance rate with this particular piece of advice is probably the lowest of anything in this section, because the effect is genuinely imperceptible and the afternoon cup is genuinely enjoyable. That gap between evidential strength and behavioural uptake is itself the interesting thing about this finding.