Over the years, many of my clients on quests to eat healthier and lose weight have told me, “I do great all day, but at night, everything just seems to fall apart.” Sometimes this happens because evening hours are less busy and structured, or because we create patterns that once formed are difficult to break, like nibbling while cooking, or always eating a sweet treat after dinner. But now, new research shows that our bodies may be physiologically programmed to crave cookies after dark.

A study in the journal Obesity concludes that our internal clock, the circadian system, prompts us to reach for sweet, starchy, and salty foods in the evenings, especially around 8:00 p.m. Throughout history, this built-in need to feed may have helped our ancestors store fat to survive when food was scarce, but today, it can take a hefty toll on your health and your waistline. So, how do you fight it? Here are six tips to prevent going overboard in the evening.

Connect the dots

For many people, eating in general, regardless of what time, tends to be mindless. But when you start thinking about food as fuel for activity, it can help bring the importance of quality and balance into focus. In a nutshell, the fate of a meal or snack depends on what’s going in your body during your post-noshing hours. Eating the bulk of your food in the evening, when your activity level is low, results in winding up with far more fuel than you body needs, and the surplus gets sent straight to your fat cells.

Your body also does the bulk of its maintenance, healing, and repair work while you sleep, so the quality of the food you eat close to bedtime is key. Processed junk won’t provide the building blocks that go to work to build muscle tissue, maintain a healthy immune system, and keep your skin looking radiant.

Health.com: Best Superfoods for Weight Loss

Break associations

If your nightly routine involves eating more than you’d like, consciously break the pattern. Just changing the order of your evening activities can help. For example, if you tend to munch while going through your mail, as you stand in the kitchen, sort it in the bedroom instead. If you tend to grab snacks during TV commercials, use those breaks to get small tasks done—fold laundry, iron, pick out your clothes for work the next day, load or unload the dishwasher, or groom your pet.

Simply breaking the connections between certain activities and eating can help your brain let go of the notion that it doesn’t feel “right” not to follow through. Setting up new routines may seem forced or awkward at first, but before long, the healthier pattern will become your new normal.

Health.com: 16 Ways to Lose Weight Fast

Pre-plan meals

If you’re worn out after a long day, thinking about what to make for dinner can feel like a burden, or at the very least a chore. Without healthy options in place, it’s so easy to order take out, make a meal out of less than optimal snacks, or reach for comfort foods. But putting healthy options in place doesn’t have to be a time suck. If you don’t feel like being creative, keep the ingredients for a few quick go-to meals on hand, so you can whip them up in a jiffy.

One of my favorite quickies is a simple lentil salad. I always keep my fridge stocked with organic greens, and steamed vacuum-sealed lentils (you can find these in the produce section). I simply toss the greens with balsamic vinegar, add a scoop of lentils, sprinkle with sliced almonds, and pair with a serving of 100 percent whole grain crackers (or crush them on top). While not as fancy as my usual fare, within minutes, dinner is done, and far more nourishing and satisfying than a frozen entrée or bowl of cereal.

Health.com: 30 Quick-and-Easy Fat-Burning Recipes

Keep a journal

I know, I know, you’ve heard this a million times, but it’s one of those tried and true tools that just works. One recent study found that women who kept food diaries lost about six more pounds than those who did not. Another discovered that keeping a food diary doubled weight loss results. If you’ve been overestimating your body’s needs, underestimating how much you eat, and engaging in a lot of mindless eating (three common missteps), journaling will keep you aware and honest, and can allow you to identify unhealthy patterns, which is the first step to changing them.

Set yourself up for sleep

Staying up late, during the hours you should be sleeping, increases the odds of overeating at night. And numerous studies over the past few years have connected a lack of adequate sleep to weight gain. Prior to the invention of the light bulb (not to mention TVs, smart phones, and laptops), we slept about 10 hours a night. Today, Americans average 6.9 hours of sleep on weeknights and 7.5 hours on weekends.

Health.com: 7 Tips for the Best Sleep Ever

Believe you can

If you believe you can change your habits and routines, you will. It sounds oversimplified, but that’s the conclusion of a recent study that analyzed data on the diet, exercise, and personality types of over 7,000 people. Those who believed they have the ability to change their lives through their own actions tended to eat healthier, exercise more, smoke less, and avoid binge drinking. When I have clients say things like, “I’ll never be able to change” I ask them to name something else they changed or achieved that they felt doubtful about, but ultimately accomplished. Reminding yourself of your past successes can help you feel more confident about your ability to transform your lifestyle.

If you need support, reach out for it. Friends, family members, co-workers, or even an online community to connect to can help immensely, especially during those moments when you just want to fall back into your old (unhealthy) comfortable routines!

This article originally appeared on Health.com.