How Your Nighttime Coffee Might Be Hacking Your Sleeping Brain

Share article:
a woman is sitting in front of a window holding a cup of coffee .

Caffeine is a part of most people’s daily rituals—whether it’s your morning latte or an afternoon energy drink. We all know it helps us stay alert. But what if your favorite stimulant is doing much more than just keeping you awake?

A new study by researchers at the Université de Montréal offers a fascinating peek into what caffeine does to your brain while you’re sleeping. And spoiler: it’s not just about poor sleep quality. Caffeine appears to make your brain more complex, shifting it closer to a state scientists call “criticality”—a sweet spot between chaos and order.

Let’s unpack what this means and why it matters.

The Study in a Nutshell

Researchers gave 40 healthy adults 200 mg of caffeine (about the amount in two cups of coffee) and recorded their brain activity while they slept using EEG (electroencephalography). Each person also had a “placebo night” for comparison.

Participants were split into two groups: younger adults (20–27 years old) and middle-aged adults (41–58 years old). The goal was to see if caffeine affects the sleeping brain differently depending on age.

They didn't just look at traditional sleep metrics like duration or sleep stages. Instead, the researchers dug deeper into the complexity of brain signals—how rich, varied, and information-dense they are.

Sleep Complexity and Criticality—Wait, What?

The concept of brain complexity might sound abstract, but think of it like this: A complex brain signal isn’t too random (like static noise), nor too simple (like a flat tone). It has just the right amount of structure to carry useful information.

This is where criticality comes in. In physics and neuroscience, a system is said to be in a “critical” state when it balances between order and chaos. It’s thought that the brain works best at this edge—flexible, efficient, and ready to adapt. Think of a jazz band improvising in perfect harmony: that’s a critical state.

Scientists believe that being in this state helps with information processing, memory, and creativity. So, when we say caffeine pushes the sleeping brain closer to criticality, we’re saying it might be making it more alert and efficient—even in slumber.

Caffeine’s Effect on the Sleeping Brain: What Changed?

During non-REM (NREM) sleep—deep, restorative sleep—caffeine caused:

  • A decrease in slow-wave activity (delta and theta brainwaves), which is usually associated with deep sleep.
  • An increase in beta activity, a pattern more often seen during wakefulness.
  • A flattening of the brain’s power spectrum, pointing to a shift toward a more excitable, awake-like state.

More importantly, brain signals showed a notable increase in complexity:

  • Entropy (a measure of unpredictability in the signal) went up.
  • Lempel-Ziv complexity (a measure of how compressible or “repetitive” a signal is) increased.
  • The DFA scaling exponent (a marker of long-term signal memory) decreased, consistent with a shift toward criticality.

This means that even though your body is asleep, your brain on caffeine becomes more “awake” in how it organizes and processes information.

Young vs. Middle-Aged Brains: Not All Sleep Equally

Interestingly, younger adults showed stronger changes, especially during REM sleep, the dream phase. Caffeine made their REM brain signals significantly more complex and closer to criticality.

Middle-aged adults didn’t show this shift during REM, even though their NREM sleep was still affected.

Why the age difference? The authors suggest it might be due to changes in adenosine receptors as we age. Adenosine is the chemical caffeine blocks to keep us awake, and its receptors become less dense with age. Fewer receptors mean less room for caffeine to work its magic.

This might explain why older adults are often more sensitive to caffeine's effects on falling asleep, but their brains don’t show the same internal fireworks once asleep.

Is This a Good or Bad Thing?

That’s the million-dollar question.

On the one hand, increased brain complexity and criticality are usually associated with better cognitive function and flexibility. But on the other, altering these dynamics during sleep might not be a good idea.

Sleep is when the brain consolidates memories, clears out waste, and resets itself. Making it “more alert” with caffeine could disrupt its natural recovery processes, especially if taken too late in the day.

In fact, other studies have linked high brain entropy during sleep to conditions like hypertension and early-stage Alzheimer’s disease. So while caffeine might boost brain complexity, that boost might come at a cost to sleep quality and long-term brain health.

Final Thoughts: Should You Rethink That Evening Espresso?

This study doesn’t mean you have to give up coffee. But it does suggest being mindful of when you drink it. If you're under 30, caffeine may keep your brain in high gear even while you’re dreaming. If you're older, your body might still feel the effects—but your brain might not respond the same way.

And while more research is needed to fully understand the consequences of caffeine-induced complexity during sleep, this study opens up a whole new way to think about how what we drink affects the brain—not just when we’re awake, but also when we’re at rest.

So the next time you reach for an afternoon cup, just remember: your brain might keep playing jazz long after the lights go out.

Source: https://www.nature.com/articles/s42003-025-08090-z