Having a drink before bedtime might make you fall asleep a little faster. But the sleep you get after imbibing may not be so restful, finds a new paper in the journal Alcoholism: Clinical & Experimental Research.

Building upon earlier research, Christian Nicholas and his colleagues at the University of Melbourne found that alcohol just before sleep can lead to poorer quality slumber.

While most people know from experience that having a drink before hitting the sack can help you feel drowsy, Nicholas and his team were interested in learning how the brain physiologically reacts to the alcohol while you’re sleeping. They had 24 (presumably eager) young adults ages 18 to 21 to spend several nights at the Melbourne School of Psychological Sciences Sleep Laboratory. On one of the nights, they would be given a nightcap (orange juice and vodka) and on another night, they’d only get a placebo (orange juice with a straw dipped in vodka). They were allowed to go to bed at their normal time, but their heads were dotted with electrodes to measure their sleeping brainwave patterns on an electroencephalogram (EEG).

MORE The More Hours You Work, the More You Drink, Study Says

Not surprisingly, on the nights they drank alcohol, people showed more slow wave sleep patterns, and more so-called delta activity—a process linked to the restorative aspects of deeper sleep, when memories are firmed up, the brain’s detritus is cleared out and hard-working neurons get some much-needed replenishment.

But that wasn’t the only thing going on in their brains. At the same time, alpha wave patterns were also heightened, which doesn’t happen during normal sleep. Alpha activity tends to occur when the brain is awake but quietly resting, in metabolic break mode. Having both delta and alpha activity together therefore leads to disrupted sleep, since the alpha functions tend to offset any restorative efforts the brain neurons are trying to squeeze in.

MORE Alcohol Poisoning Kills 6 Americans a Day

In fact, such dual activity patterns are typically seen among people with chronic pain conditions and in lab-based studies where people are intentionally given electric shocks while they slept. “People tend to feel that alcohol helps them fall asleep a little quicker, and therefore people associated that with helping them sleep,” says Nicholas. “But when you actually go and look at what is happening while they sleep, the quality of that sleep isn’t good.”

In previous studies, such warring alpha-delta brain patterns during sleep have been linked to daytime drowsiness, waking up not feeling rested, and symptoms like headaches and irritability. Whether similar outcomes occur among people who drink before bed isn’t clear yet, says co-author Julia Chan, but it’s reasonable to think that they might. “When you see alpha activity alongside delta activity during sleep, it suggests there might be some kind of wakefulness influence that could compete with the restorative nature of delta sleep,” she says.

This doesn’t mean that you should avoid alcohol at night all the time; occasionally indulging in a nightcap probably won’t disrupt your sleep too much. But, “if somebody is doing this night after night after night, the effects can be cumulative, not only for alcohol use but on sleep disruption as well,” says Nicholas.

Read next: School Should Start Later So Teens Can Sleep, Doctors Urge

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Listen to the most important stories of the day.

Contact us at letters@time.com.