Coffee: it contains multitudes. The beverage you reach for in the morning to clear up the fog of last night’s slumber and get you ready to tackle the day can also give you a bad case of the mid-day sleepies. As it turns out, this paradoxical effect is the result of the structure of the caffeine molecule and how it interacts with the brain.

As reported by the New York Times, it’s all about “sleep pressure.” While the exact inner workings aren’t yet known, sleep pressure is essentially a build-up accumulated as soon as we wake up that drives us to go back to sleep. Throughout the day, our body exerts energy via a molecule known as adenosine triphosphate, ATP for short. In the process of making ATP, our cells create a byproduct, adenosine, which binds to certain receptors in the brain and cause us to get sleepy.

Now, caffeine is structurally similar enough to adenosine that it is temporarily able to bind to those same receptors, keeping adenosine from doing so and thus temporarily keeping the sleep pressure adenosine would have caused at bay. But the adenosine doesn’t really go anywhere. So once the caffeine falls off, there’s a backup of adenosine that can then attach to the now-open receptors, causing a “very high level of sleep pressure,” per Dr. Seth Blackshaw, a neuroscientist at Johns Hopkins University.

The problem is then compounded by continued and increased caffeine consumption. Our bodies will adapt to the stimulus by both increasing the protein in the liver that breaks down caffeine faster as well as the number of adenosine receptors in our brain. The result is, per Dr. Mark Stein of the University of Washington, “continued or increased caffeine consumption negatively impacts sleep, which will also make us feel more tired.”

There are also knock-on effects of caffeine contributing to its ability to cause drowsiness. Caffeine can lead to spikes in blood sugar as well as cause dehydration, both of which can make us feel sleepy.

Per the NYT, the only way to get rid of sleep pressure is with sleep. So instead of reaching for another coffee in the PM to get through the day’s back nine, water may be a better option. (If I absolutely must have something, I’ll opt for a tea.) Or a nap, if you’ve got that sort of luxury. Coffee, though, may actually be doing more harm than good. The Caffeine giveth, and the Caffeine taketh away.

Zac Cadwalader is the managing editor at Sprudge Media Network and a staff writer based in Dallas. Read more Zac Cadwalader on Sprudge.