You drink coffee at 3 PM, fall asleep fine at 11 PM, and wake up at 3 AM staring at the ceiling. You assume something else is wrong โ stress, the weather, that weird dream. It's almost always the coffee.
The relationship between caffeine and sleep isn't about whether you can fall asleep. It's about whether you can stay in deep sleep long enough to feel rested. And the answer hinges on a single number most people have never thought about: caffeine's half-life.
The 5-hour half-life nobody warned you about
Caffeine has a half-life of roughly 5 to 6 hours in a healthy adult. That means if you drink a 200 mg coffee at 12 noon:
| Time | Caffeine in your system |
|---|---|
| 12:00 PM (drink) | 200 mg |
| 5:30 PM | ~100 mg |
| 11:00 PM (bedtime) | ~50 mg |
| 4:30 AM | ~25 mg |
| 10:00 AM (next day) | ~12 mg |
50 mg at bedtime isn't enough to keep you awake, but it's plenty to suppress the brain's adenosine signaling โ the system that pushes you into deep sleep. You fall asleep on schedule, but your body never gets to spend enough time in the deepest stages.
What "deep sleep suppression" actually feels like
Deep sleep (also called slow-wave sleep) is when your body does the heaviest restorative work: clearing metabolic waste from the brain, releasing growth hormone, consolidating memory. Caffeine in your bloodstream during the first half of the night cuts deep sleep duration by up to 20%, according to a 2013 study in the Journal of Clinical Sleep Medicine.
The result the next day:
- You feel groggy even though you "slept 8 hours"
- You need a coffee just to feel normal โ which restarts the cycle
- Memory and focus are noticeably worse
- You're more emotionally reactive
This is the caffeine trap. The thing that's making you tired in the morning is the thing you reach for in the afternoon.
The 2 PM cutoff (and why it's actually conservative)
Sleep researchers โ including Matthew Walker, who runs UC Berkeley's Center for Human Sleep Science โ recommend stopping caffeine roughly 8โ10 hours before bedtime. For someone going to bed at 10 PM, that's a 12 PM to 2 PM cutoff.
Two PM is the version most people can actually stick to. It still leaves about 25โ50 mg in your bloodstream at bedtime, but for non-sensitive sleepers, that's the threshold below which deep sleep is mostly preserved.
Are you a "slow metabolizer"?
Caffeine is broken down by a single liver enzyme called CYP1A2. About 50% of people have a slow-acting variant โ meaning your half-life is closer to 8 hours than 5. If coffee "doesn't affect you" but you have inexplicable sleep issues, you're probably one of them. For slow metabolizers, the cutoff should be earlier: noon, or even skipping afternoon caffeine entirely.
What about decaf, tea, and chocolate?
- Decaf coffee: 2โ15 mg per cup. Almost always fine in the afternoon.
- Black tea: 40โ70 mg per cup. A 3 PM tea is roughly equivalent to a 4 PM espresso for sleep impact.
- Green tea: 20โ40 mg per cup. Borderline OK in the late afternoon for most people.
- Dark chocolate (70%+): 20โ60 mg per 100g bar. A square or two after dinner is fine; half a bar is not.
- Pre-workout / energy drinks: 150โ300 mg. Treat like an espresso.
How to switch without the headache
Going cold turkey on afternoon caffeine triggers withdrawal headaches and 2โ3 days of fatigue. Better approach:
- Week 1: Replace your 3 PM coffee with green tea (about 30 mg vs 200 mg).
- Week 2: Move green tea to 1 PM. Drink water at 3 PM.
- Week 3: Skip the afternoon caffeine entirely. The morning coffee still works.
By week 3, most people report falling asleep faster, less middle-of-the-night waking, and โ counterintuitively โ needing less coffee in the morning to feel alert. The reason: when deep sleep is restored, you wake up genuinely rested, so your "need" for a chemical kick-start drops.
Toggle "Caffeine after 2 PM" in Dozely's calculator โ it adds 12 minutes to your fall-asleep buffer and adjusts your energy forecast.
Common questions
I drink coffee at 6 PM and sleep fine. Why does this apply to me?
Falling asleep โ sleeping well. You can pass out from sheer exhaustion at 11 PM and still spend two hours less in deep sleep than you would have without the coffee. Track your actual rest, not your bedtime.
Does ice coffee or cold brew have less caffeine?
Usually the opposite. Cold brew is brewed for 12โ24 hours and typically has more caffeine per ounce than hot coffee. A 16-oz cold brew can pack 200โ300 mg.
What about coffee right after waking?
Some research suggests waiting 90โ120 minutes after waking lets your natural cortisol peak first, then caffeine works better. This is a tweak, not a requirement. The cutoff time matters far more than the start time.
I'm pregnant / breastfeeding. Is 2 PM still the cutoff?
Talk to your OB. Pregnancy increases caffeine half-life to 10+ hours, and many providers recommend keeping total daily intake under 200 mg.
The headline summary: caffeine doesn't disappear when you stop noticing it. The afternoon coffee you don't think about is the one quietly costing you the best part of tonight's sleep.