You go out with your friends on a Friday night after work for happy hour. One drink becomes two, or maybe even three, and suddenly you find yourself nodding off at the bar while your friends hit the dance floor. You figure you may as well go home and get some shuteye. But a couple hours after you hit the pillow, you’re suddenly wide awake. You can’t sleep after drinking, and you spend the rest of the night tossing and turning in bed, regretting that third glass of wine.

It’s the ultimate conundrum, illustrating the strange relationship between alcohol and sleep. Alcohol makes you sleepy, but drinking alcohol is also bad for sleep. What is it about this substance that impacts our ability to get restful sleep? What is “drunk sleep” and why should you be worried about it? And how can you enjoy a night on the town without suffering through a lousy night of sleep afterward?

We dug up some answers to these questions that both surprised and enlightened us.

Why Does Alcohol Inhibit Sleep?

It’s not just your imagination. It is easier to fall asleep after a glass of wine, but it’s harder to stay that way. Alcohol is a sedative, and so it sparks feelings of drowsiness. But alcohol reduces the rapid eye movement stage — the sort of deep sleep you need to feel rested and reinvigorated. When you skimp on REM sleep, you may wake up frequently or you may simply feel tired, as though you didn’t sleep at all last night when, in reality, you got your full eight hours.

Alcohol can also spark short bouts of sleep apnea, in which the sleeping body “forgets” to breathe. These long pauses also mess with REM sleep and make you feel extra tired from all the added effort of stopping and starting a sleep schedule.

What Is Drunk Sleep?

Alcohol is so notorious for robbing people of good sleep it’s actually earned a nickname: Drunk sleep. Drunk sleep has a number of undesirable qualities, including:

Waking up much more quickly than you would without alcohol

Greater propensity toward sleep disruption

Impact on the pituitary gland, which may suppress secretion of growth hormone

How Can I Avoid Being Asleep Drunk?

You want to enjoy a night on the town, but you still want to get decent rest, as well. The best way to do this is to stop drinking about four hours before you hit the sack. This may mean getting an earlier start on the night or planning to stay up later when you return home so that you don’t fall asleep while you’re still under the influence.

Drink plenty of water throughout the night to flush out your system. And, of course, be sure you have a designated driver to get you back to your home safely. Follow these guidelines and drunk sleep can be a thing of the past, giving you the rest you need to recover after a night on the town.