A single night of poor sleep is enough to throw off your body’s circadian rhythms, which determine when you feel sleepy and when you feel alert and awake, says study author Felino Cagampang, PhD, a senior lecturer at the University of Southampton. While exposure to sunlight plays a large role in regulating your sleep cycle, Cagampang’s research team found that your diet can actually override your circadian clock, and can help you overcome jet lag, a wonky work schedule, or a few nights of inconsistent sleep.  More from Prevention.com: The Noise That Will Help You Sleep Better How? It’s complicated, but it has to do with something called the “food entrainable clock,” which is regulated by your brain’s hypothalamic region, Cagampang says. Put simply, eating trumps sleeping when it comes to your brain’s survival hierarchies, and so your body’s food clock is able to dictate terms to your body’s sleep clock, says Cagampang. He offers the following advice for those of us hoping to corral wayward sleep patterns:

Stop eating 12 hours before breakfast. As the word “breakfast” implies, your body recognizes morning as the time when you “break” your longest “fast” of the day, Cagampang says. So for optimal sleep, you should be eating during daylight hours and fasting when it’s dark.Your morning meal should be the biggest. Morning is the optimal time to power-up on carbs, proteins, and other nutritional energy sources, Cagampang says. You need that energy while you’re awake, not at night when you’re preparing to sleep. Try to cut back on carbs and protein in the late afternoon and evening as you prepare to sleep, or else you’ll signal to your body that you plan to be awake for a while, he says.Avoid saturated fats—especially at night. Studies have shown that foods containing saturated fat, such as red meat, pork, lamb, and most dairy products, disrupt circadian rhythms, and so eating them near bedtime may prevent you from falling asleep, Cagampang says. (See how even a little saturated fat can damage your heart.)

For more ways to get your best night’s sleep ever, see 20 Ways To Sleep Better Every Night