HomeLuna Health Journal Does Caffeine Really Ruin Your Sleep?
  • Buy Luna Band
  • Buy Luna Smart Ring Gen 2
  • Buy Luna Ring Gen 2 with Dock Charger
  • Accessories
  • Luna Community
  • Luna Creator Program
  • Luna In Press
  • Luna Echo Blogs
  • Talk to Support
  • Privacy Policy
  • Cookie Policy
  • Terms of Use
  • Luna in Press
  • Careers
  • Terms of Sale - Ring
  • Terms of Sale - Band
  • Where is my Order?

Does Caffeine Really Ruin Your Sleep?

That afternoon coffee might be doing more than keeping you alert. Here is what research says about caffeine and sleep, how long it can linger, and a simple 7-day test to find your own cutoff time.

Short answer

Caffeine can disrupt sleep, but it does not ruin it for everyone. Research shows that caffeine taken hours before bed can delay sleep, shorten it and lighten it, often without people noticing. Timing, dose and personal sensitivity matter most, so most people can keep coffee by setting an earlier cutoff.

Key facts

  • A 2023 systematic review and meta-analysis of 24 studies found caffeine reduced total sleep time by about 45 minutes and sleep efficiency by about 7%.
  • In a small 2013 experiment of 12 healthy sleepers, 400 mg of caffeine taken 6 hours before bed cut objectively measured sleep by more than an hour.
  • The Sleep Foundation says caffeine has a half-life of anywhere between 2 and 12 hours, depending on the person.
  • The FDA says 400 mg a day is an amount not generally linked with negative effects in most healthy adults, but sensitivity varies widely.
  • The NHS advises people who are pregnant to have no more than 200 mg of caffeine a day.

In this article

  1. How does caffeine affect sleep?
  2. How long does caffeine stay in your body?
  3. What does research say about caffeine and sleep?
  4. Can caffeine hurt your sleep even if you feel fine?
  5. What time should you stop drinking caffeine?
  6. Who should be extra careful with caffeine?
  7. How can you test your own caffeine cutoff?
  8. Frequently asked questions
  9. Final thoughts
  10. Sources and further reading

How does caffeine affect sleep?

Caffeine affects sleep mainly by blocking adenosine, a brain chemical that builds up while you are awake and makes you feel sleepy. With adenosine partly blocked, caffeine makes you feel more alert, and that same alertness can delay bedtime sleepiness and make sleep lighter or shorter.

Adenosine and sleep pressure

Adenosine is often described as part of your body's sleep pressure system: the longer you stay awake, the stronger the urge to sleep. A 2022 review in the Journal of Sleep Research by Reichert and colleagues describes adenosine as widely accepted as a sleep-regulating substance and the route through which caffeine promotes wakefulness.

How long does caffeine stay in your body?

Caffeine stays in your body for hours, and how long varies a lot between people. The Sleep Foundation says caffeine has a half-life of anywhere between 2 and 12 hours. Half-life is the time your body needs to clear half of a dose, so a late coffee can still be active at bedtime.

Alcohol is another evening habit that changes sleep, though in a different way. Our guide on how alcohol changes sleep quality explains how.

The Sleep Foundation adds that effects typically begin after around 30 minutes and may last up to five hours or longer. Dose, how often you drink caffeine and your genetics all play a part.

Two factors are worth knowing. Nicotine use can shorten caffeine's half-life by up to 50%, so people who smoke may clear it faster. Late in pregnancy, the half-life can be about twice as long as in the general population, according to the same source.

Close-up of roasted coffee beans

What does research say about caffeine and sleep?

Controlled studies consistently show that caffeine can shorten and lighten sleep. The strongest evidence comes from a 2023 meta-analysis and from a small but influential 2013 experiment that tested caffeine at different times before bed.

The 2023 meta-analysis

Gardiner and colleagues pooled 24 studies in a 2023 systematic review and meta-analysis in Sleep Medicine Reviews, as summarised by the American Journal of Managed Care. Caffeine was linked with about 45 fewer minutes of total sleep time, about 7% lower sleep efficiency, about 9 more minutes to fall asleep and about 12 more minutes awake after sleep onset.

Deep sleep fell by about 11.4 minutes on average, while REM sleep showed no significant effect across 10 studies. Based on their modelling, the authors suggested that a coffee with 107 mg of caffeine should be consumed at least 8.8 hours before bed to avoid reduced sleep time. For a pre-workout supplement with 217.5 mg, the figure was at least 13.2 hours.

There are limits. Studies used different doses and protocols, some used activity monitors that may underestimate time awake, and regular caffeine use may build tolerance. Treat the numbers as averages, not a prediction for your own night.

The 2013 timing experiment

In a study published in the Journal of Clinical Sleep Medicine in 2013, 12 healthy normal sleepers took 400 mg of caffeine at bedtime, 3 hours before bed and 6 hours before bed. According to the American Academy of Sleep Medicine, even the 6-hour dose reduced total sleep time by more than one hour.

The sample was small and the dose was large (about 2 to 3 cups of coffee), so it shows a possible effect rather than a rule for every cup. The authors concluded that caffeine generally should be avoided after 5 p.m. to allow healthy sleep.

Can caffeine hurt your sleep even if you feel fine?

Yes, caffeine can disturb sleep without you noticing. In the 2013 experiment, participants were largely unaware of the sleep disturbance caused by afternoon caffeine, even though measurements showed a clear reduction in sleep time. Feeling fine is therefore not proof that your sleep was unaffected.

Tolerance adds a wrinkle. Evidence on regular use is mixed: some studies suggest people become less sensitive to caffeine's effects on sleep, but this varies, and the meta-analysis authors noted that chronic exposure may increase tolerance. A lack of obvious symptoms still does not guarantee unchanged sleep.

Myth vs fact

Myth: If I fall asleep easily after an afternoon coffee, caffeine is not affecting my sleep.

Fact: Falling asleep quickly is only one part of sleep. In the 2013 experiment, people were largely unaware of reduced sleep time, so how you feel is an unreliable guide. Tracking your own pattern over several nights is more informative.

What time should you stop drinking caffeine?

A common guideline is to stop caffeine at least 8 hours before bedtime, and earlier if you are sensitive. The Sleep Foundation suggests a minimum of eight hours, or 10 hours or more if you struggle with sleep. For a 10 p.m. bedtime, that means no caffeine after about 2 p.m.

Dinner timing sits in the same wind-down window. See whether eating late at night hurts your sleep for how late meals fit in.

The research points the same way. The 2023 meta-analysis suggested about 8.8 hours for a standard coffee, which for an 11 p.m. bedtime is around 2 p.m.

How much caffeine is in common drinks?

Amounts vary by brand, brew and size. The FDA gives these typical ranges per 12 fluid ounces, and shows how easily a hidden source can sneak in late in the day.

Typical caffeine per 12 fl oz serving (FDA)
Drink Caffeine (mg) Late-day note
Regular brewed coffee 113 to 247 Widest range, check the cup size
Black tea 71 Often an afternoon habit
Green tea 37 Lower, but it adds up
Energy drinks 41 to 246 Read the label closely
Soft drinks 23 to 83 Easy to overlook with dinner

The FDA says 400 mg a day is an amount not generally associated with negative effects in healthy adults. That number is about total daily intake, not timing, so you can stay under it and still sleep poorly if much of it arrives late.

Luna Band

Note your last coffee, then compare it with your own sleep and heart rate trends

Luna Band does not measure caffeine, so jot down the time of your last cup yourself. Over a couple of weeks you can compare those notes with your tracked sleep and heart rate trends to see what your own pattern looks like. Luna reports 96.5% heart rate accuracy against a Polar chest strap (company-reported), and states that no sensor is right for every body in every moment.

Explore Luna Band ↗Read Luna's accuracy validation

Coffee mug with spilled coffee on a table by a window

Who should be extra careful with caffeine?

People who are pregnant, take certain medications or have heart, anxiety or sleep conditions should be more careful with caffeine. The FDA notes wide variation in both sensitivity to caffeine and how fast the body clears it, and says body weight, medications and medical conditions all play a role.

Pregnancy

The NHS says you should not have more than 200 mg of caffeine a day during pregnancy, and notes that too much has been linked with a higher chance of miscarriage and stillbirth. The FDA also advises people who are pregnant, trying to conceive or breastfeeding to ask a healthcare provider whether to limit caffeine.

Medications, conditions and sleep problems

Medications and medical conditions can change how caffeine affects you, so ask a pharmacist or doctor if you take regular medicines or have a heart rhythm problem, anxiety or reflux. The Sleep Foundation advises speaking to a healthcare provider if you feel very sleepy during the day and caffeine is not helping, as this could point to a sleep disorder or another medical issue.

How can you test your own caffeine cutoff?

You can test your caffeine cutoff by changing one thing for a week and recording how you sleep. Move your last caffeinated drink earlier, keep other habits steady and compare nights. One week is a rough guide only, because sleep varies naturally, so repeat the test if the result is unclear.

If you also change your evening protein, how protein affects your sleep covers what research suggests about it.

Try this: 7-day experiment

  1. Pick a usual bedtime, count back 8 hours, and write that time down as your trial cutoff (for example, 2 p.m. for a 10 p.m. bedtime).
  2. Each day, log every caffeinated drink with its time and size, including tea, cola, energy drinks and chocolate.
  3. Each morning, rate how long it took to fall asleep, how often you woke and how rested you feel, from 1 to 5.
  4. If you use a tracker, note your sleep and heart rate trends next to your caffeine log. The tracker does not record caffeine, so the log is yours to keep.
  5. Keep your bedtime, alcohol, late meals and exercise as steady as you can, so caffeine is the only thing you change.
  6. After 7 days, compare the days with an earlier cutoff against your usual days. Look for patterns, not single nights.
  7. If nothing changes, caffeine may not be your main issue. If sleep problems continue for weeks, talk to a healthcare professional.

Frequently asked questions

Does decaf coffee affect sleep?

Decaf is not guaranteed to be caffeine-free, and amounts vary by product, so the label is the best guide. For most people a single cup is unlikely to matter much. If you are very sensitive or drink several cups late in the day, try a caffeine-free option instead.

Is it okay to drink coffee in the afternoon?

It depends on your sensitivity, dose and bedtime. The Sleep Foundation suggests a cutoff of at least eight hours before bed, which often falls around 2 p.m. If you like an afternoon cup, test an earlier cutoff for a week and compare how you sleep.

Can caffeine reduce deep sleep?

Research suggests it can. The 2023 meta-analysis found deep sleep fell by about 11.4 minutes on average, and light sleep increased, while REM sleep showed no significant effect. These are group averages from varied studies, so your own change could be smaller or larger.

Why does caffeine keep some people awake and not others?

People clear caffeine at different speeds, with a half-life that can range from 2 to 12 hours according to the Sleep Foundation. Dose, how often you drink it, genetics, nicotine use and pregnancy all matter. That is why one person sleeps fine after dinner coffee and another does not.

How much caffeine is too much in a day?

The FDA identifies 400 mg a day as an amount not generally associated with negative effects for most healthy adults, though sensitivity varies widely. It is lower for pregnancy, where the NHS advises no more than 200 mg. Sleep can still suffer below these limits if caffeine comes late.

Can I build a tolerance to caffeine's effect on sleep?

Possibly, but the evidence is mixed. The 2023 meta-analysis authors noted that chronic caffeine exposure may increase tolerance, and the Sleep Foundation says regular use can dampen its alertness effects. Tolerance does not guarantee unchanged sleep, so an earlier cutoff can still be worth testing.

Final thoughts

Here is the short recap.

  • Caffeine taken hours before bed can delay, shorten and lighten sleep, often without you noticing.
  • Timing, dose and personal sensitivity matter most, and many people can keep their coffee by moving the cutoff earlier.
  • Try the 7-day experiment above to find your own cutoff, and speak to a healthcare professional if you are pregnant or take medicines.

Your turn: What time is your last coffee of the day, and does it change how you sleep? Tell us in the comments.

Luna Band

Track your own trends with Luna Band

Sleep, heart rate, HRV, stress and recovery insights in one band, with up to 10 days of typical battery life. No subscription required.

Buy now ↗

Sources and further reading

  1. American Academy of Sleep Medicine. Late afternoon and early evening caffeine can disrupt sleep at night. AASM news release on Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 2013.
  2. American Journal of Managed Care. Caffeine and sleep review suggests consumption guidelines. Summary of Gardiner C, Weakley J, Burke LM, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews, 2023.
  3. Reichert CF, Deboer T, Landolt HP. Adenosine, caffeine, and sleep-wake regulation: state of the science and perspectives. Journal of Sleep Research, 2022 (record page).
  4. Sleep Foundation. Caffeine and sleep. Sleep Foundation website.
  5. US Food and Drug Administration. Spilling the beans: how much caffeine is too much?. FDA consumer update.
  6. NHS. Foods to avoid in pregnancy. NHS website.

Keep reading

  • How alcohol changes sleep quality
  • Does eating late at night hurt your sleep?
  • How protein affects your sleep

General information only, not medical advice. It does not replace guidance from a qualified healthcare professional. Speak to one about any health concern.

Continue Reading

Why Do You Sleep Badly the First Night in a New Place?

Why Can Your HRV Rise After a Hard Workout?

When in the Night Does Your Heart Rate Hit Its Lowest and Does It Matter?