What time do you usually eat dinner? For many people, a long day at work is followed by a long commute. You might not sit down until 7 or 8 p.m., and if you nibble on cheese and crackers before, and have a few bites of chocolate after, it’s deceptively easy to keep snacking all evening. Without even realizing it, you could be tallying more than a thousand calories after dark. If you try food logging for a few days and realize that you’re consuming most of your daily needs at night, here’s why you should to shut the fridge door and think about that for a second.

Eating Late Leads to Weight Gain

“It’s not that your body processes calories any differently at different times of day,” says Alissa Rumsey, MS, RD, CSCS, and author of Three Steps to a Healthier You. “But at night, you’re most likely sedentary and not moving. Since you’re just sitting on the couch or getting ready for bed, you aren’t using those calories for energy, and your body is more likely to store them as fat.” A small recent study does suggest that delayed eating can negatively impact your metabolism and hormones. And there’s plenty of research from over the years, confirming that nighttime eating can contribute to weight gain—although it definitely depends on the types of foods you’re snacking on.

Avoiding Too Many Carbs Is Key  

“What you really want to avoid are large portions of processed carbs and sugar,” says Rumsey. “Those foods digest quickly, spike your blood sugar, and, if your body doesn’t burn it off, that excess sugar will get stored as fat. You also want to limit high-fat foods, which can contribute to acid reflux or heartburn.” Yes, that’s two strikes against chocolate ice cream, which is high in both sugar and fat.

But don’t despair and go to bed hungry. New research suggests that it might not be that bad to have a small, nutrient-dense snack in the evening, especially if you’re an athlete trying to build muscle, or diabetic and managing your blood sugar levels. Just keep it to a small portion, at 200 calories or less, and balance a small amount of healthy carbs with protein and healthy fats. Rumsey recommends a banana with peanut butter or a small bowl of whole-grain cereal with skim milk—if you’re genuinely hungry and need the calories.

Setting a Healthy Eating Schedule Can Help

“I always encourage getting back in touch with whether you’re actually feeling hungry or full,” says Rumsey. “If you’re getting home late and haven’t eaten in several hours, of course, you can have a smart snack! But if your nighttime eating tends to be treats, say no to those extra calories.” Establish a healthy eating schedule that works for you and your lifestyle. For most people, that means three meals and two snacks, with no more than 3 to 4 hours between. Check your overall intake across the day, and make sure you’re eating enough calories at breakfast and lunch, to avoid coming home ravenous. An afternoon snack packed with protein and fiber, like nuts, can help take the edge off, too. Then keep an eye on how much and how late you’re eating into the evening.

And if you struggle with mindless eating (i.e., binging on the couch), it can be helpful to set a time when the kitchen is closed. To start, you can try to keep your eating hours between 8 a.m. and 8 p.m. But even if you’re a shift worker, like a nurse or chef, decide what your “normal” day looks like, and try to eat your last full meal at least a few hours before going to bed. For a little extra nudge and motivation, set a silent alarm in the Fitbit app. Rumsey recommends brushing your teeth before putting up your feet to watch your favorite show. Whatever it takes to fine-tune your evening routine, the point is to make it a healthy habit.