Staring into the fridge again? Whether you’re trying to lose weight or simply not gain any, nighttime snacking can spell disaster. In fact, the calories we eat at night may play a more significant role in weight gain than the ones we eat at breakfast and lunch simply because of how the body works.

A Japanese study found that, in a perfect world, we should stop eating two hours before going to bed. While that might work in Japan, the American lifestyle often means staying up late, past 11 pm or even midnight because of work deadlines or social demands, and you may want a snack at night.

Willpower weakens as you get fatigued, so having a strategy to deal with nighttime noshing is key. Here’s advice from Stephen P. Gullo, PhD, a health psychologist who has specialized in weight control for four decades.

FIRST, SET THE GROUND RULES

Don’t mistake sleepiness for hunger. In the hours after dinner, as your body moves into sleep mode, there’s no more need for food. But if instead of going to bed, you stay up to read a book, watch TV or pay bills, you may feel the urge to eat. Acknowledge that this snack attack isn’t true hunger because you’ve probably already eaten enough for the day. Satisfy the urge with a glass of water or a cup of caffeine-free herbal tea. If you make it so hot or cold that you can only sip it, you can trick yourself into feeling full.

Identify your snacking patterns. Many evening activities lend themselves to mindless or mood-triggered eating. You may munch as you watch TV or pay those bills, not noticing as the food disappears. Or perhaps you’re anxious about the day’s events, so you eat to forget your troubles. Separate mood from food, and find other ways to express emotions, such as journaling, calling a friend or distracting yourself with a novel. It also helps to acknowledge your “food genes.” Are you wired for sweets or for salty foods? Be especially mindful of the tastes you typically crave—you’ll want to avoid these triggers when making snack choices. For instance, one cookie won’t satisfy someone with a sweet tooth, but one salty chip might. Don’t feel guilty about your likes—just work with them.

Reality check: Think historically, not just calorically. For one week, write down what and how much you eat at night…and what you’re doing and how you’re feeling as you snack. Then, to change your habits, plan your snack schedule in advance, listing healthful foods in your journal and what time you will eat them. Eating meals with a definite structure may also help squash nighttime temptation. Having small amounts four or five times a day optimizes metabolic efficiency and keeps blood sugar stable. Result? Less hunger and mindless eating.

Make a “no-shopping” list. To keep food out of mind, keep it out of house. When nighttime cravings kick in, people rarely rush out to the store to buy them—they satisfy their cravings with what’s already on hand. Do you keep your kitchen stocked with favorite snacks? This opens the door to constant temptation. Availability creates craving, and variety stimulates consumption. It’s easier to resist just once…when you’re at the supermarket.

Smart: On your shopping list, include a separate section for foods you won’t buy. Review your shopping cart before you hit the checkout line and put back anything on that list. Make a point of creating a shopping list of healthy options—if berries and carrots aren’t written down, you may not remember to buy them.

Eat a better dinner. Make this meal high in protein—eggs, white meat (turkey or chicken) or seafood—and vegetables that are low in starch and sugar. Avoid high-starch foods such as potatoes, rice, corn and pasta (as well as pizza and burritos). They stimulate insulin production, which causes the body to store more calories as fat—and nighttime is when you’re most vulnerable to fat storage. If you’re going to eat high-starch foods, have them at lunch. On the other hand, don’t confuse a light dinner with a small dinner—you can have a large volume of shrimp and green beans, for instance.

WHEN HUNGER STRIKES, SNACK SMARTER

It’s hard to go cold turkey with nighttime noshing, but it’s possible to snack smarter if you can’t shake the habit completely. And sometimes you’re truly hungry because you forgot to eat or have to work late and can’t focus without food. That’s fine—as long as you stick mostly to healthful foods and reasonable portions. Yet it’s all too easy to overindulge. You might be too distracted to notice how much you’re nibbling, so eat mindfully.

Eat dinner—again. If you find yourself wanting to eat nonstop at night, your behavior is saying that you’re seeking greater volume and a longer eating time. For many, having a small sweet treat stimulates rather than satisfies the appetite, so a paltry-yet-calorie-dense smidgen of fudge only leads to frustration or, worse, acts as a trigger for eating more. Have a satisfying, high protein mini-meal instead. For people whose habit is to nibble all through the evening, having this extra meal, which takes some time to prepare and eat, will be much more satisfying than a snack that can be gobbled down in four spoonfuls, such as a diet pudding.

Consider: An egg plus an extra egg-white (to add volume without too many calories) omelet with sautéed veggies…a shrimp cocktail with a green salad…homemade tuna salad made with a tablespoon of light mayo or no-fat plain Greek yogurt…or zucchini “pasta” with a tablespoon of fresh Parmesan cheese. Be sure that your favorites from these choices make it onto that shopping list above. And because foods placed at eye level in the front of the fridge will seem to call your name, put them there.

Choose wisely when a packaged snack is your only option. Caught at a convenience store on your way home or on the road? Shop for a premeasured high-protein snack that clocks in at about 100 calories. Choose a food low in carbs and sugar. A container of plain Greek yogurt with fresh fruit, a cheese stick, nuts, high-fiber crackers or a low-calorie ice cream or frozen yogurt bar are all acceptable choices. Do a reality check before choosing: Does the food satisfy or stimulate? For instance, if you know that once you eat a bag of salty crackers, you’ll be reaching for another one, firmly say to yourself, “That choice doesn’t work for me,” and pick something else. Also pay attention to packaging size. Look for single servings—no large bags or containers that encourage mindless overeating.

Close the kitchen. After you’ve had your last meal or smart snack, turn off your kitchen lights. People don’t like to go into a dark room, so this simple step can help keep you from going back to the fridge just one more time. Then go brush and floss your teeth—no one wants to floss twice in an evening!

For more fast ways to get in shape for summer, please see the following stories…

The 8-Hour Diet

9 New Ways to Lose the Last 10 Pounds

The Secret to a Truly Sculpted, Sleek Body

Can the Love Hormone Help You Lose Weight?