Sleep better

Caffeine and Sleep: How Late Is Too Late?

Caffeine blocks the brain signal that builds sleepiness, and its effects can last well into the evening. We explain the research on timing, how much is safe, and how to cut back if it is costing you sleep.

How caffeine keeps you awake

Through the day a chemical called adenosine builds up in the brain and creates sleep pressure. Caffeine blocks adenosine receptors, so you feel less sleepy even though the pressure is still there. When caffeine wears off, that sleepiness returns, which is the familiar afternoon crash.

It lasts longer than you think

Caffeine's half-life (the time for your body to clear half of it) averages around 5 hours in adults, but it varies widely between people, from a couple of hours to much longer. Pregnancy and some medications slow its clearance considerably, while smoking speeds it up. So a strong coffee at 3pm can still leave a meaningful dose in your system at 11pm.

What the research says about timing

In a well-known 2013 study published in the Journal of Clinical Sleep Medicine, 400 mg of caffeine (roughly the amount in a few cups of brewed coffee) taken 6 hours before bed still significantly disrupted sleep and reduced total sleep time by more than an hour as measured objectively. Participants often did not notice the effect themselves.

A common recommendation is to have your last caffeine at least 6 to 8 hours before bed. If you are sensitive, have insomnia or sleep poorly, try a cutoff around noon for 2 weeks and see if it helps.

How much is safe

The US Food and Drug Administration says 400 mg per day is an amount not generally associated with negative effects for healthy adults. That is a ceiling for safety, not a target for sleep. Pregnant people are usually advised to limit caffeine further and should follow their clinician's advice. Children and teens should limit caffeine, and energy drinks are not recommended for them.

Hidden sources

  • Tea (black and green), matcha and yerba mate
  • Cola and many other soft drinks
  • Energy drinks and shots, which can contain several hundred milligrams
  • Pre-workout powders and some weight-loss supplements
  • Dark chocolate and cocoa, in smaller amounts
  • Some pain relievers that include caffeine
  • 'Decaf' coffee, which still contains a small amount

Cutting back without the headaches

Stopping suddenly can cause withdrawal headaches, fatigue and irritability for a few days. Reduce gradually over 1 to 2 weeks, for example by replacing one cup at a time with decaf or swapping coffee for tea. Move your last cup earlier in the day before you reduce the total amount.

Using caffeine strategically

Caffeine is a useful tool when used deliberately: early in the day, before a long drive when you are well rested, or at the start of a night shift. It does not replace sleep, and relying on it to cover chronic sleep loss usually makes the underlying problem worse.

Frequently asked questions

Why can I drink coffee at night and still fall asleep?

Some people clear caffeine faster or are less sensitive. But even when you fall asleep, caffeine can reduce deep sleep and make sleep lighter, which you may not notice.

Is decaf completely caffeine-free?

No. Decaf coffee contains a small amount of caffeine, far less than regular coffee. For most people it does not affect sleep.

How much caffeine is in a cup of coffee?

It varies a lot by bean, brew method and cup size. An 8 ounce cup of brewed coffee is often cited at around 80 to 100 mg, and large coffee shop drinks can contain much more.

Sources

This page is general information, not a diagnosis or medical advice. Read our medical disclaimer.