But beyond that basic rule, studies done at the Salk Institute in La Jolla, Calif., show that when you eat those calories could have an effect on your weight and your health.

Unlike our ancestors who went to sleep at a reasonable hour, people today often burn the midnight oil. If you're also snacking well into the night, you might be thwarting your weight loss efforts.

Researchers compared the effects of a few different diets on two groups of mice. Those with access to a set amount of food for just eight hours a day were healthier and slimmer than those with access to the same number of calories but without time restrictions.

The researchers also tested that theory on a group of obese mice. When their food was limited to nine hours a day, they started losing weight, even though the overall number of calories they ate didn't change. The same results were seen when they ate between 9 and 12 hours a day, even when the restrictions were eased on weekends, both of which are more realistic for people.

There's also evidence that a shortened eating pattern could prevent obesity, so it's an option to consider regardless of your current weight.

To test restricted eating for yourself, try cutting out all snacks after dinner, or have your last calories of the day no later than 8 to 12 hours after breakfast.

Remember that it takes time to change behavior, especially when the habit is taking a trip to the fridge before you turn in. It might help to stop eating one hour earlier each week until you reduce your eating "window" to that 8- to 12-hour limit.