
Does Alcohol Help You Sleep? Why a Nightcap Backfires
Alcohol makes you fall asleep faster, then breaks up the second half of the night: less REM, more waking, worse snoring and apnea. What to do instead.
Food, drink & sleepSleep hygiene & daily habits
The afternoon coffee feels harmless because you cannot feel it by bedtime. Your sleep can, and the evidence gives a clearer answer to "how late is too late" than most people expect.
Written by the Complete Sleep editorial team
Pending medical review
Published Updated 6 min read


Medical reviewer
Sleep Physician · Board-certified in Sleep Medicine
Pending medical review
In short
Caffeine takes about five hours to fall by half, so a 3 pm coffee is still active at bedtime. In the best-known study, 400 mg six hours before bed cut sleep by about an hour, and people underestimated the loss. For most adults, stop caffeine eight hours before bed, count tea, cola, energy drinks and headache tablets, and run a two-week self-test to find your own cut-off.
Key takeaways
Caffeine blocks adenosine, a chemical that builds up in the brain across the day and creates sleep pressure. The pressure keeps building; you just feel less of it, and when the caffeine clears, the backlog is waiting.
The problem is how slowly it clears. Caffeine's half-life, the time your body takes to remove half of a dose, is about five hours in a typical adult, so a 200 mg coffee at 3 pm leaves roughly 100 mg circulating at 8 pm and 50 mg at 1 am: too little to feel, but often enough to make sleep lighter and shorter.
The most cited timing experiment, by Drake and colleagues in the Journal of Clinical Sleep Medicine in 2013, gave twelve healthy adults 400 mg of caffeine (roughly two to three strong coffees) or a placebo at bedtime, three hours or six hours before bed, with home sleep monitoring.
Even the six-hour dose cut measured sleep by about an hour, and participants underestimated the loss. The authors advised avoiding substantial caffeine for at least six hours before bed: for an 11 pm bedtime, nothing sizeable after 5 pm. Six hours is a floor, not a promise; the study used one large dose in healthy adults, and slow metabolizers will need more.
Caffeine is broken down mainly by a liver enzyme called CYP1A2, whose speed varies widely between people. Some of the difference is inherited (genetically "fast" versus "slow" metabolizers); some is circumstance:
People also differ in how strongly they respond to the same dose, partly because the adenosine receptors caffeine acts on vary genetically too, which is why two colleagues can share a 4 pm coffee and only one lies awake.
Most people count their coffees and forget the rest. Approximate amounts, using the American Academy of Sleep Medicine's estimates:
These figures and the limits below are for adults. The AASM advises parents to limit children's caffeine; energy drinks and caffeine tablets are not appropriate for children or teenagers and, as the FDA cautions, are no substitute for sleep.
Caffeine can cause insomnia on its own; researchers have even used it to model insomnia. It is seldom the whole story in chronic insomnia, but it is a recognized, reversible cause of poor sleep that feeds the cycle: a bad night leads to more caffeine, later in the day, and a lighter, shorter night follows. Our guide to insomnia and what actually helps covers the rest of the picture.
Caffeine can also mask the daytime sleepiness that would otherwise prompt someone to get checked for sleep apnea. If you need several coffees to stay awake despite a full night in bed, especially if you snore or wake unrefreshed, read about the symptoms and risks of sleep apnea or try the STOP-Bang self-check.
A sensible default for most adults is no caffeine within eight hours of bedtime, and none within ten if you are a slow metabolizer, older, or dealing with insomnia: in practice, last coffee by early afternoon. Keep daily totals under about 300 to 400 mg, the AASM's suggested ceiling.
Rather than trusting a rule, test it:
Shifting timing rather than cutting the total avoids most withdrawal. If you do cut back, go gradually: stopping abruptly commonly brings headache, tiredness and low mood starting 12 to 24 hours after the last dose, peaking over the next day or two and lasting up to a week; dropping about one serving every few days usually avoids that.
Chest pain or discomfort, fainting, or a racing or irregular heartbeat that does not settle within minutes needs urgent medical help: call your local emergency number, whatever you think triggered it.
Talk with a doctor if caffeine regularly gives you milder palpitations; if you have high blood pressure or a heart condition; if you are pregnant or breastfeeding (obstetric guidance caps pregnancy intake at 200 mg a day, and the AASM suggests less); or if you take medicines that may interact with it. If sleep stays poor once caffeine is well away from bedtime, mention that too; caffeine may have been hiding the real cause.
Caffeine blocks the brain's sleep-pressure signal and takes about five hours to fall by half, so an afternoon dose is still active at bedtime. In the best-known study, 400 mg six hours before bed cut sleep by roughly an hour, and people underestimated the loss. Your cut-off depends on genetics, age and circumstances, so count every source, start from eight hours before bed, and run a two-week self-test to find what your body actually needs.
At least six hours for a sizeable dose, based on a 2013 study in which 400 mg taken six hours before bed cut sleep by about an hour. Eight hours is a safer default for most adults, and ten or more if you are older, a slow metabolizer, or already struggling with insomnia.
Brewed decaf contains only a few milligrams of caffeine per cup, which is negligible for most people. If you are very sensitive, keep in mind that amounts vary between products and coffee shops.
Caffeine is cleared by a liver enzyme (CYP1A2) whose speed is partly inherited and also changed by smoking, pregnancy, age, liver disease and some medicines. People also differ in how strongly they respond to a given dose, partly through genetic variation in the adenosine receptors caffeine acts on.
Stopping abruptly often causes headache, tiredness and low mood starting 12 to 24 hours after the last dose and lasting up to a week. Moving your caffeine earlier instead of cutting the total, or reducing by about one serving every few days, usually avoids this.
Two-minute check
Wondering about snoring or daytime sleepiness? STOP-Bang is scored in your browser.
Take the self-check
Alcohol makes you fall asleep faster, then breaks up the second half of the night: less REM, more waking, worse snoring and apnea. What to do instead.

Meal timing beats 'sleep foods': late meals and reflux, the two-to-three-hour rule, light snacks, and the thin evidence for tart cherry and magnesium.