Nosh on junk and you’ll snooze like garbage: Eating lots of sugar can screw with your sleep, a new study from Columbia University suggests.

In the study, people who ate the most sugar in their diet throughout the day experienced more arousals—intrusions that pull you out of deep sleep without actually awakening you—than those who ate less sweet stuff.

Sleep arousals can make you feel chronically wiped out, since they pull you back into a lighter, less restorative, stage of sleep. 

Related: The Better Man Project—2,000+ Awesome Tips on How to Live Your Healthiest Life 

Consuming more refined carbs, like white breads and pastas, was also linked with more sleep arousals.

That’s because these kinds of carbs delay your body’s release of melatonin, a hormone that controls your sleep-wake cycle and helps you slide into deeper, higher-quality sleep, explains study author Marie-Pierre St-Onge, Ph.D. 

If you want to start sleeping more soundly, try slowly cutting back your sugar intake to see if that helps you wake up more well-rested. Follow these 6 Easy Ways to Beat Your Sugar Habit to make some painless tweaks to your diet.

You should also look to replace those empty, refined carbs with high-fiber ones, St-Onge suggests. Think some steel-cut oats as a breakfast side instead of a slice of white toast.

In the study, eating more fiber was linked to more time in deep, slow wave sleep, possibly because fiber slows down digestion, and doesn’t cause a spike in blood sugar levels like empty carbohydrates do, St-Onge says.