coffee before bed

Most of us drink coffee to feel energized during the day. Coffee keeps us alert by wading off sleep.

However, drinking coffee can also lower the quality of sleep you get. It’s common to hear how you shouldn’t drink coffee too late during the day (usually after 5 PM). This is because caffeine causes sleep disturbance. Even when consumed 6 or so hours before bedtime, caffeine can negatively affect the quality and amount of sleep a person gets.

Coffee Before Bed

That cup of coffee you take late in the evening or night to keep alert as you conclude your day could end up keeping you up at night for longer than you might have expected. The effects can even be carried on to the following day!

Acute Withdrawal Symptoms

The possibility of experiencing caffeine withdrawal symptoms the following day after consuming coffee late at night is high. It leads to side effects like anxiety, poor concentration, and headaches.

The latest research on the subject of drinking coffee at night explains that caffeine withdrawal can happen from consuming as little as just 30 mg of caffeine.

Disrupts the Body Clock

circadian rhythm and coffee

The human body is made up of different cells, each having its own circadian rhythm. The body clock hums along in the background, and as daylight fades with the setting of the sun, the gears start shifting to prepare your body for rest. When you consume coffee a few hours before heading to bed, this psychoactive drug seems to disrupt the working of your body’s internal clock.

According to one study, when you take a double espresso some 3-hours before bedtime, it delays by about 40 minutes, the production of the vital sleep hormone melatonin, thus making it harder for you to fall asleep.

Caffeine Blocks Adenosine

It’s not just the body’s clock that makes you feel sleepy. The body also has the in-built homeostatic sleep-wake system that triggers the buildup of adenosine. Adenosine is a chemical that inhibits body processes that tend to make you feel alert and awake. Taking caffeine has the effect of blocking adenosine, making the drinker to feel more alert.

Sleep-Wake Disorders

There is also a possibility that drinking coffee late at night contributes to sleep issues like circadian sleep-wake disorders. This is when people can’t sleep or wake up during the desired times.

Psychological And Health Impact

Caffeine tends to delay the onset of sleepiness. In the long run, it could also potentially become a major cause for insomnia, which is dangerous for your mental and physical health. Intake of stimulants like caffeine could trigger conditions like anxiety, stress, mood disorders, depression, and other mental health conditions in the long run.

For most, the caffeine benefits supersede the consequences. Coffee serves as a central nervous system activator by triggering temporary stimulating effects. Depending on the type of coffee bean and the brewing method, caffeine levels per cup can vary greatly.

If you drink light roast coffee, it might not significantly affect your sleep. But if you consume dark roast coffee in large quantities, it may become harder for that buzzy feeling to kick in. Moderation in drinking is key in terms of preventing most of the functional disturbances associated with coffee such as nervousness, irritability, and sleep problems.

How To Enjoy Coffee Responsibly

So, you’ve determined that sleep is more important than staying caffeinated 24/7. That’s a good choice. Here are some quick tips and wins to do so:

  • Size matters – use a smaller coffee mug. Stop walking around with a half a liter mug around the office. Beat the habit of having to sip coffee every 30 seconds.
  • 4 cups a day, according to some research. But, again, don’t use a gigantic cup. Stay within 400 mg of caffeine per day, and you should be fine. 
  • Don’t drink coffee when you are bored. Oh, you’ve got nothing to do for the next 30 minutes – why not make a quick cup of Joe. No! Read a book, or watch a Youtube video instead!


What time should you stop drinking coffee?

It really depends on what your current sleeping cycle is. If you want to go to bed early, say 8 or 9 PM (year, right), you should cut coffee short around 2 PM. If you are a night owl, then subtract 6 hours from the time you plan on sleeping, and cut coffee then. 

How long before coffee’s effects wear off?

4 to 6 hours in most people. But, everyone is different. Back in my university days, when I was overdosing on coffee, I think at some point it started wearing off within 10 minutes! However, that didn’t mean that my body was ready to release melatonin – a chemical compound that is essential for a good night sleep or rest.


  1. Drake C1, Roehrs T, Shambroom J, Roth T. J Clin Sleep Med. 2013 Nov 15;9(11):1195-200. doi: 10.5664/jcsm.3170. – Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed.
  2. Tina M. Burke, Rachel R. Markwald, Andrew W. McHill. Science Translational Medicine 16 Sep 2015: Vol. 7, Issue 305, pp. 305ra146 – Effects of caffeine on the human circadian clock in vivo and in vitro.
  3. Pavlova M. – Continuum (Minneap Minn). 2017 Aug;23(4, Sleep Neurology):1051-1063.
Frequently Asked Questions
Is it okay to drink coffee at night?

Yes, new research has found that drinking coffee at night (4 hours or less before you go to sleep) won’t impact the quality of your sleep. If you’re very sensitive to caffeine you might have trouble settling down, however!

Drinking coffee at night to stay awake, whether it’s for a night shift or last-minute studying, can keep help you stay alert but isn’t a healthy habit if you don’t establish a regular sleeping routine.

What happens if you drink coffee before sleeping?

Caffeine takes between 10 and 40 minutes to start influencing your body and mind, so if you fall asleep quickly after finishing your coffee, you might not notice the caffeine at all. If the caffeine is in full effect and/or you’re sensitive to it, you might struggle to fall asleep if you feel too alert and energetic. A recent study has proved that caffeine has no effect on the quality of sleep once you’re finally there.

How long before bed can I drink coffee?

Coffee can stay in your system for 12 hours, but after 6 or 7 hours the effects have completely worn off and you won’t have any trouble sleeping. If you drink a coffee at 4pm, you’ll be fine to sleep without any lingering effects of the caffeine by 10pm to 11pm, or sooner if you are less sensitive to caffeine.