Caffeine and Sleep: How Long It Stays in You

Quick Answer: Caffeine half-life is 5–7 hours. A 3 PM coffee still has half its caffeine active at 8–10 PM. Cut off by 2 PM for most people; noon for sensitive individuals. Even if you can fall asleep, caffeine reduces deep sleep significantly, affecting next-day performance without you knowing.
⏱ 6 min read

How Caffeine Works: Adenosine Blockade

Caffeine doesn't create energy, it blocks the perception of tiredness. The mechanism: adenosine is a neurotransmitter that accumulates in the brain throughout the waking day. As adenosine builds up, it binds to adenosine receptors and produces increasing feelings of drowsiness, the feeling of "sleep pressure" that builds from the moment you wake up and peaks in the evening.

Caffeine is an adenosine receptor antagonist: it binds to adenosine receptors without activating them, blocking adenosine from binding. The brain doesn't feel sleepy because the receptors that signal sleepiness are occupied. But the adenosine continues to accumulate behind the blockade, when caffeine is eventually metabolized and clears the receptors, all the accumulated adenosine floods in simultaneously, producing the pronounced afternoon "crash" associated with morning-only coffee drinkers who didn't have additional caffeine to block the rebound.

Caffeine Half-Life and Duration

Understanding caffeine timing requires understanding the half-life concept:

Caffeine Half-Life Calculator Example:
  • A standard large coffee (16 oz, 300 mg caffeine) consumed at 3:00 PM
  • By 8:00–10:00 PM (5–7 hours later): ~150 mg still active (half-life 1)
  • By 1:00–5:00 AM (10–14 hours later): ~75 mg still active (half-life 2)
  • By 6:00 AM the next morning (15 hours later): ~37 mg still active
A 3 PM large coffee has not cleared your system by morning. The sleep-affecting dose (approximately 100 mg or more) remains active well into the sleeping period for average metabolizers.

The 5–7 hour half-life range represents the average for adults. In practical terms:

  • Coffee at 8 AM: mostly metabolized by early afternoon
  • Coffee at 12 PM: half active at 5–7 PM; quarter active at 10 PM–midnight
  • Coffee at 3 PM: half active at 8–10 PM; significantly active at 10 PM bedtime
  • Coffee at 6 PM: still substantially active at midnight and beyond

How Caffeine Impacts Sleep Architecture

Caffeine's sleep impact goes beyond simply delaying sleep onset:

Sleep Onset (Latency)

The most obvious effect, caffeine delays the time to sleep onset by keeping adenosine receptors blocked. Even moderate caffeine (100–200 mg) consumed 6 hours before bed measurably increases sleep onset time in controlled studies.

Deep Sleep (N3/Slow-Wave Sleep) Reduction

The most significant and underappreciated effect. A landmark study published in Science Translational Medicine (2013) found that 400 mg of caffeine consumed 6 hours before bed reduced slow-wave sleep by approximately 20%, measured objectively by EEG. Subjects did not report significantly worse sleep, they didn't perceive the reduction. Yet they had meaningfully less of the most physically restorative sleep stage.

The implication: people who say "I can drink coffee at 5 PM and sleep fine" are likely correct about sleep onset, but incorrect about sleep quality. They may fall asleep normally but get less deep sleep, affecting physical recovery, immune function, and next-day cognitive performance.

Total Sleep Time

Caffeine before bed typically reduces total sleep time, partly through delayed onset, partly through more nighttime waking. Studies show average total sleep time reduction of 27–40 minutes from evening caffeine use.

Finding Your Personal Cutoff Time

Cutoff Time by Bedtime and Sensitivity:
  • Sleep at 9–10 PM, average sensitivity: Cut off at 1–2 PM (8 hours before bed)
  • Sleep at 10–11 PM, average sensitivity: Cut off at 2–3 PM (8 hours before bed)
  • Sleep at 11 PM–midnight, average sensitivity: Cut off at 3–4 PM
  • Caffeine-sensitive (difficulty sleeping, anxious): Cut off 2–4 hours earlier than the above
  • Fast metabolizer (verified by genetics test or experience): Can extend 1–2 hours later than average
  • Oral contraceptives: Slow caffeine metabolism significantly, treat as caffeine-sensitive and cut off earlier

Individual Variation in Caffeine Metabolism

The 5–7 hour half-life is an average, actual individual half-lives range from 2–3 hours to 9–12 hours. This enormous variation is primarily genetic:

  • CYP1A2 gene: The enzyme that metabolizes caffeine in the liver. Fast metabolizers (AA genotype) process caffeine in 2–4 hours; slow metabolizers (CC genotype) take 7–10 hours. Approximately 50% of the population are slow metabolizers.
  • Oral contraceptives: Estrogen-based contraceptives inhibit CYP1A2 activity, approximately doubling caffeine half-life in women on the pill
  • Pregnancy: Caffeine half-life extends significantly during pregnancy, reaching 15+ hours in the third trimester
  • Liver disease: Impaired liver function slows caffeine metabolism substantially
  • Age: Older adults metabolize caffeine more slowly than younger adults on average
  • Smoking: Smokers metabolize caffeine approximately twice as fast as non-smokers (smoking induces CYP1A2)

Hidden Caffeine Sources

Caffeine cutoff adherence requires awareness of all caffeine sources, not just coffee:

Caffeine Content of Common Beverages (Approximate):
  • Espresso (1 shot / 30 ml): 60–75 mg
  • Drip coffee (240 ml / 8 oz): 95–165 mg (highly variable by roast and brew)
  • Tim Hortons medium coffee: ~140 mg
  • Starbucks Pike Place Grande (16 oz): ~310 mg
  • Black tea (240 ml): 40–70 mg
  • Green tea (240 ml): 20–45 mg
  • Matcha (1 tsp powder): 70 mg
  • Cola (355 ml can): 35–40 mg
  • Energy drink (473 ml): 80–200 mg (varies widely)
  • Dark chocolate (28 g / 1 oz): 20–30 mg
  • Decaf coffee (240 ml): 5–30 mg (not zero)

Two notes of particular importance: "decaf" coffee contains 5–30 mg of caffeine per cup, not zero. For caffeine-sensitive individuals, an evening decaf contains enough caffeine to meaningfully affect sleep. Green tea's caffeine is often underestimated, an evening "relaxing" green tea contains 30–45 mg of caffeine, similar to half a can of cola.

Caffeine Tolerance and Sleep

Chronic caffeine use develops tolerance to many of caffeine's acute effects, the stimulant effect diminishes as adenosine receptor density increases (the brain grows more receptors to compensate for chronic blockade). However, tolerance to caffeine's sleep-disrupting effects does not fully develop:

  • Regular coffee drinkers feel less energized per cup over time (stimulant tolerance)
  • Regular coffee drinkers still experience sleep architecture disruption from evening caffeine at measurable rates (limited tolerance to sleep disruption effects)
  • This explains the paradox of people who "can drink coffee at night and sleep fine", they feel they can fall asleep, but their sleep quality measures (deep sleep, total sleep time) are still meaningfully affected

Frequently Asked Questions

Q: Can caffeine withdrawal affect sleep?

Yes, caffeine withdrawal (from stopping regular caffeine use) causes headache, fatigue, difficulty concentrating, and sometimes disturbed sleep for 1–5 days. Ironically, quitting caffeine can temporarily worsen sleep during the withdrawal period before improving it. The withdrawal headache occurs because removal of caffeine's adenosine blockade allows adenosine to bind freely to receptors whose density has increased over the period of chronic caffeine use, producing an intense sleep pressure and headache until receptor density normalizes. Gradual reduction (tapering over 1–2 weeks rather than abrupt cessation) significantly reduces withdrawal symptoms.

Q: Is caffeine addictive?

Caffeine produces physical dependence (the body adapts to its presence and produces withdrawal upon cessation) but not addiction in the clinical sense (compulsive use despite significant harm). The DSM-5 includes "caffeine withdrawal" as a clinical diagnosis but not "caffeine use disorder" for most caffeine consumers. Physical dependence develops within days of regular use and withdrawal symptoms appear within 12–24 hours of cessation. For most people, caffeine dependence is manageable, its sleep effects are the most clinically significant consequence of regular use.

Q: Does tea affect sleep less than coffee?

Tea generally contains less caffeine per serving than coffee, so moderate tea consumption has less sleep impact than equivalent coffee consumption. However, tea also contains L-theanine, an amino acid that promotes relaxation and modulates caffeine's stimulant effects, producing a "calm alertness" rather than the sharp jolt of espresso. L-theanine may slightly reduce caffeine's sleep impact compared to equivalent caffeine from coffee alone. That said, a strong black tea (70 mg caffeine) consumed at 6 PM still contains significant sleep-affecting caffeine, the caffeine content, not just the beverage type, determines the sleep impact.

Shop: Compare Our Mattresses

Shop This Topic at Mattress Miracle

Popular picks at Mattress Miracle:

Or compare our mattresses in our Brantford showroom.

Better Sleep Starts with the Basics

Caffeine timing is one foundational sleep hygiene adjustment. Your sleep surface is another, a mattress that causes pain, retains heat, or doesn't support your sleep position adds physiological arousal that compounds any caffeine still in your system. At Mattress Miracle in Brantford, we help sleepers address the environmental factors they can control. Visit us for a no-pressure sleep setup consultation.

Optimize Your Sleep Environment →
Back to blog