Most dieters start the day with great intentions – but can’t always eat healthy from breakfast until bedtime. For example, a lot of us eat a healthy breakfast, watch our calories at lunch, and cruise through a healthy dinner. But we feel empty, and scarf down junk food just before bed. If that sounds painfully familiar, your willpower’s not the issue – it’s your body clock.

According to a study in the journal Obesity, your internal clock – or circadian rhythm – sends out an S-O-S for sweet, starchy, and salty foods every night at about 8 o’clock. In the good old days, this preprogrammed snack alarm helped our ancient ancestors store a few extra calories for tough times and helped them stay warm on long, cold winter nights. Today, it just makes us pack on the pounds. 

But, we’re not doomed to diet failure. We can learn to fight the junk-food “witching hour”:

  • First: Consciously break the pattern. Registered dietician Cynthia Sass says one way is to shake up your evening routine. And since changing one habit makes it easier to change others, start with something simple, and non-food related. For example, if you always sort the mail at the kitchen table, sort it in the bathroom instead. 

  • Another tip: Since most people have an association between eating and the TV, giving up television will work wonders. If you can’t make it through the evening without seeing the latest episode of Cupcake Wars or Mad Men, find a way to keep your hands busy. Whether you knit a sweater, or give your dog a good brushing. 

  • Finally, go to bed early. The later you stay up, the more you throw off your circadian rhythms, and the more likely you are to break down and eat. Need proof? Before the invention of the light bulb, people slept 10 hours a night, and the average body mass index was under 20. Today, most people are lucky to get 7 hours of sleep, and the average BMI is pushing 30.