Skip to content
Back to Blog caffeine

Caffeine and Sleep: How Late Is Too Late for That Coffee?

Caffeine has a half-life of about 5 hours — your afternoon coffee is still in your system at bedtime. A practical guide to caffeine timing, doses, and hidden sources.

Dozy Team
caffeinecoffeesleep-hygienesleep-tips

Most people know that a shot of espresso at 10 PM is a bad idea. What surprises them is that the coffee they had at 3 PM might be doing the same damage — quietly, invisibly — right as they’re trying to fall asleep.

Caffeine is the most widely used psychoactive substance on the planet, and it works remarkably well. The problem is that it works for much longer than most of us realize. Understanding a bit of the science behind it can shift your entire relationship with your morning cup — and your sleep.

How Caffeine Works

Your brain monitors how long you’ve been awake through a molecule called adenosine. Adenosine builds up throughout the day and binds to receptors in the brain, creating the sensation of tiredness. The longer you’re awake, the more adenosine accumulates, and the sleepier you feel.

Caffeine doesn’t give you energy. What it does is block those adenosine receptors, so the sleepiness signal can’t get through. You feel alert and focused — not because you have more energy, but because the message telling you you’re tired has been temporarily intercepted.

The catch: adenosine doesn’t go anywhere. It keeps building up behind the blockade. When caffeine eventually clears, all that accumulated adenosine floods the receptors at once. That’s the crash — and it’s also part of why poor sleep feels even worse after a caffeine-heavy day.

How Long It Lingers

Here’s where most people are surprised: caffeine has a half-life of roughly five hours. That means five hours after your last cup, about half the caffeine is still circulating in your bloodstream. After ten hours, a quarter remains.

Run the numbers on a typical day. If you drink a coffee at 2 PM:

  • By 7 PM, half the caffeine is still active
  • By midnight, about a quarter is still present

For someone going to bed at 11 PM, that 2 PM coffee has left a meaningful amount of stimulant in their system right as they’re trying to fall asleep. It may not keep them awake outright, but research shows it suppresses slow-wave sleep — the deep, restorative stage your body needs most — even when you don’t notice the effect consciously.

Genetic Differences

Not everyone processes caffeine the same way. Your liver uses an enzyme called CYP1A2 to break it down, and the gene that encodes this enzyme has two common variants: fast and slow.

Fast metabolizers clear caffeine quickly — their half-life might be closer to three to four hours, which means they can often tolerate a mid-afternoon coffee without much impact on sleep. Slow metabolizers, on the other hand, may have a half-life closer to six to eight hours or more. For them, even a morning coffee can still be measurably active at bedtime.

Other factors that slow caffeine metabolism include pregnancy, hormonal contraceptives, certain liver conditions, and some medications. Smoking tends to speed it up. Age also matters — caffeine sensitivity generally increases as you get older.

If you’ve ever watched a friend drink an espresso at 9 PM and sleep soundly while you’re wired until 2 AM after a single afternoon cup, genetics is almost certainly the explanation.

The Cutoff Time

A practical guideline that works for most people: stop consuming caffeine at least eight hours before your intended bedtime.

If you’re aiming to be asleep by 11 PM, your cutoff is 3 PM. For a 10 PM bedtime, it’s 2 PM. For slow metabolizers or those who are particularly sensitive, pushing that cutoff earlier — to noon or even late morning — may produce noticeably better sleep.

There’s also an argument for shifting your first cup later. Cortisol, your body’s natural alerting hormone, peaks in the first hour or two after waking. Drinking coffee during that window adds stimulant on top of stimulant and may actually contribute to tolerance buildup faster. Many sleep researchers suggest waiting until 90 to 120 minutes after waking before your first cup — letting cortisol do its job, then using caffeine to extend the alertness a bit further.

If you use Dozy to track your sleep, you may already notice patterns around days when you consumed caffeine later — the data can make the connection more concrete than intuition alone.

Common Sources: How Much Caffeine Are You Actually Getting?

Caffeine content varies more than most people expect, even within the same type of drink.

SourceTypical Caffeine Content
Espresso (single shot, ~30ml)60–75 mg
Drip / filter coffee (240ml)80–120 mg
Cold brew (240ml)100–200 mg
Black tea (240ml)40–70 mg
Green tea (240ml)20–45 mg
Matcha (prepared, 240ml)50–70 mg
Yerba mate (240ml)65–130 mg
Energy drink (240ml)70–160 mg
Dark chocolate (40g)20–60 mg
Decaf coffee (240ml)5–15 mg

A few things worth noting: cold brew is often much stronger than people expect because of the high coffee-to-water ratio used in brewing. A large energy drink can contain two to three times the caffeine of a standard espresso. And dark chocolate, while not a major source on its own, adds up if you’re eating it in the evening.

Hidden Caffeine

Beyond obvious drinks and foods, caffeine hides in places many people don’t think to check.

Some over-the-counter cold and flu medications contain caffeine — often 30 to 60 mg per dose — to counteract drowsiness caused by antihistamines. Pre-workout supplements are another significant source, with some products delivering 150 to 300 mg per serving. Certain headache medications (like Excedrin) use caffeine as part of their formula because it enhances the effect of pain relievers.

Decaf coffee is worth a specific mention: it is not caffeine-free. The decaffeination process removes most but not all caffeine, and a typical cup contains five to fifteen milligrams. Drinking several decaf coffees in the evening can add up to a modest but meaningful amount.

Cutting Back Without Headaches

If you decide to reduce your caffeine intake or shift your cutoff time earlier, going cold turkey is rarely the right approach. Caffeine creates physical dependence through receptor upregulation — your brain grows more adenosine receptors to compensate for the blockade, which is part of why tolerance develops over time. Stopping abruptly triggers withdrawal: headaches, fatigue, irritability, and difficulty concentrating, typically peaking 20–51 hours after the last dose.

A gradual reduction works much better. Decrease your daily intake by about 10 percent every week or two. If you normally drink three cups, go to two and a half, then two, then one and a half. The headaches are minimal or absent, and your brain has time to slowly downregulate the extra receptors.

For the first few days of any reduction, staying well hydrated helps — dehydration worsens caffeine withdrawal headaches considerably. Keeping a consistent sleep schedule during the transition also smooths the process, since adequate sleep naturally reduces the intensity of adenosine-driven tiredness and lessens the perceived need for caffeine.

One more thing worth watching: the caffeine-tolerance trap. As tolerance builds, you need more caffeine to achieve the same alerting effect. That extra caffeine disrupts sleep. Poorer sleep means more fatigue. More fatigue means you reach for more caffeine. It’s a cycle that tightens slowly, and it often looks like a general problem with feeling tired rather than a caffeine problem specifically. Periodic resets — lowering intake for a few weeks — can break the loop and restore caffeine’s effectiveness at lower doses.

Try Dozy Tonight

Better sleep starts with knowing what’s working against it. Dozy helps you build the kind of consistent, calming bedtime routine that makes it easier to actually fall asleep — even when you’ve been working on your caffeine timing.