It’s pretty simple: When you shut the fridge and go to bed, the number of extra calories you eat totals zero. But when you start snacking, the sky can be the limit, says Stoler. “Weight gain or loss comes down to the total number of calories you consume in the day,” she notes. If you eat at night because you are keeping later hours, that may not be a problem, but if your eating window stays open longer, that’s when you can get into trouble.