An afternoon coffee that stops feeling like anything by dinner can still change the night that follows. The gap between how long caffeine feels active and how long it acts is the point.
Caffeine works by blocking a sleepiness signal
Adenosine accumulates in the brain across waking hours as a byproduct of cellular energy use, and binding to its receptors promotes sleepiness. This buildup is one of the two main drivers of when sleep arrives.
Caffeine occupies those same receptors without activating them, so the accumulated adenosine cannot deliver its signal. Alertness rises because a brake has been blocked, not because a stimulant has been added.
The adenosine itself has not gone anywhere. It continues accumulating throughout the period the receptors are blocked, which is why sleepiness can arrive sharply once the blockade lifts.
Elimination takes far longer than the sensation
The body clears caffeine through liver enzymes, and the time required to remove half the amount present is measured in hours rather than minutes for most adults.
That means a meaningful fraction of an afternoon dose remains in circulation at bedtime, still occupying receptors, even though the drinker stopped noticing any effect long before.
Tolerance compounds the mismatch. Regular consumers feel less of a lift from the same dose while the pharmacological blockade continues operating much as before.
Clearance speed varies widely between people
The principal enzyme handling caffeine varies in activity between individuals for genetic reasons, producing substantial differences in how long a dose persists.
Pregnancy slows clearance considerably, as do certain medications including some oral contraceptives, while smoking accelerates it by inducing the same enzyme.
This variation explains why an evening espresso is genuinely inconsequential for some people and disruptive for others, without either being mistaken about their experience.
The disruption shows in sleep structure, not only onset
Caffeine near bedtime lengthens the time taken to fall asleep, but it also reduces slow-wave sleep, the deep stage concentrated in the first part of the night.
A person can therefore fall asleep at a normal time, sleep an ordinary number of hours, and still wake unrefreshed because the composition of that sleep changed.
Since slow-wave sleep is where much of the recovery from accumulated sleep pressure occurs, its reduction has effects that a duration figure will not reveal.
What this does and does not settle
The mechanism explains why a cutoff time works better than judging by how alert a drink makes someone feel in the moment.
It does not establish a correct cutoff for any individual, because clearance rates, sensitivity and habitual intake differ too much for a single rule.
Persistent insomnia is not explained by caffeine alone, and anyone whose sleep problems continue after adjusting intake should raise it with a physician.