Heavy boozing can make you feel like a sleep-deprived zombie the next day—and not only because you were out until 2 a.m. Drinking lots of alcohol before bed can decrease the time you spend in deep sleep and cut down the hours of ZZZs you clock, research has shown.

A new Japanese study helps explain why: When you’re sleeping sober, your parasympathetic nervous system (PNS) kicks in, lowering your heart rate and relaxing your muscles. As a result, you sleep deeply and wake up feeling rested. But when you’re drunk, your sympathetic nervous system—which keeps you alert and active during the day—never relinquishes control to your PNS, explains Seiji Nishino, Ph.D., a professor of psychiatry at Stanford University and one of the study’s contributors.

So how much can you drink without ruining your sleep? In the Japanese study, men who drank a moderate amount of alcohol—the equivalent of three 350 ml for a 77 kg man—slept about 10 minutes less than the guys who drank a non-alcoholic placebo. But men in the study who drank twice as much alcohol—or roughly 6 beers—slept 30 fewer minutes and woke up nearly twice as often during the early morning hours.

Although a little alcohol now and then may help you fall asleep, drinking even moderate amounts too frequently will seriously screw with your sleep cycle, says J. Todd Arnedt, Ph.D., director of the Behavioral Sleep Medicine Program at the University of Michigan.

“Tolerance develops pretty quickly to the sedative effects of alcohol,” Arnedt says. That means if you’re frequently reaching for a bedtime bottle, you’ll need more and more alcohol to feel the same effect.

Bottom line: A small nightcap now and then may help you fall asleep. But if you want to get a full night’s rest on a regular basis, pass on the boozeand learn to decompress before you hit the hay. Studies have shown that following a routine, dimming the lights, and avoiding stress-related triggers like e-mail right before bed can help you fall asleep and stay asleep