Caffeine is the most widely used stimulant in the world and one of the most common contributors to poor sleep. The main misunderstanding concerns how long it lasts.
How it works
Adenosine builds up in the brain through the day and produces the pressure to sleep. The longer you have been awake, the more accumulates and the sleepier you feel.
Caffeine blocks adenosine receptors, so the signal is not received. The adenosine is still there, which is why the tiredness arrives suddenly once the caffeine wears off.
This is masking rather than energy, which explains why caffeine cannot replace sleep and why the crash follows.
How long it lasts
The half-life of caffeine in adults is commonly around five to six hours, meaning half is still present after that time. A quarter remains after ten to twelve hours.
A coffee at four in the afternoon therefore still has a meaningful amount circulating at bedtime for most people.
Individual variation is considerable and partly genetic. Some people metabolise it quickly and sleep fine after an evening coffee; others are affected by a single cup at lunchtime.
Metabolism is slowed by some medications including certain hormonal contraceptives, and by pregnancy. It is faster in smokers, which is why people who quit smoking frequently find their usual caffeine intake suddenly feels excessive.
It affects sleep quality, not just onset
This is the part people miss. Someone who falls asleep easily after an evening coffee may conclude caffeine does not affect them.
Studies find that caffeine reduces deep sleep and total sleep time even where sleep onset is unaffected. The sleep is lighter and less restorative without necessarily being shorter.
The result is waking unrefreshed, needing caffeine to function, and the cycle continuing.
The self-sustaining loop
Poor sleep produces daytime tiredness, which produces caffeine use, which reduces sleep quality, which produces more tiredness.
People frequently arrive at very high intakes gradually without recognising the pattern, and the intake feels necessary rather than optional.
Where it hides
Coffee and tea are obvious, and green tea contains a meaningful amount despite its reputation.
Energy drinks frequently contain considerably more than a coffee. Cola contains it. Chocolate contains small amounts. Some cold and headache remedies contain caffeine, sometimes without it being prominent on the packaging.
Decaffeinated is not caffeine-free, though the amounts are small.
The anxiety connection
Caffeine produces raised heart rate, jitteriness and a sense of alertness that is physically indistinguishable from anxiety.
In people prone to panic, it can precipitate attacks, and reducing it is frequently one of the more effective single changes available.
The combination of poor sleep and high caffeine intake produces a state that is easily mistaken for an anxiety disorder.
Cutting down without the headache
Withdrawal produces headaches, fatigue and irritability, typically starting within a day and lasting several days.
Reducing gradually over a couple of weeks avoids most of this. Cutting one drink at a time, starting with the latest in the day, works better than stopping abruptly.
Substituting decaffeinated for the later drinks preserves the ritual, which is frequently what people are actually attached to.
A reasonable target
Keeping caffeine to the morning and early part of the day suits most people, and a common suggestion is nothing after early afternoon.
If you are sensitive, the cut-off may need to be earlier. Testing this by moving the last drink progressively earlier for a fortnight is more informative than guessing.
The masking problem
Caffeine conceals the extent of sleep deprivation, which is precisely why it is so widely used and why it makes the underlying problem harder to see.
Someone whose functioning depends on caffeine has no accurate sense of how tired they actually are. Reducing it temporarily reveals the true baseline, which is uncomfortable and considerably more informative than continuing to mask it.
What to expect
People who reduce substantially frequently report better sleep quality within one to two weeks and, after the withdrawal period, more stable energy through the day rather than peaks and crashes.
This is general information rather than medical advice.