A 2008 study published in the American Journal of Clinical Nutrition found nighttime eaters consumed more total calories than non-nighttime eaters, the difference being how many calories were ingested at night. Thus, a consistent piece of advice for weight loss is to ignore cravings before bed. But Picture Fit, a health and fitness YouTube channel, finds there’s more to it than that.

There are three theories concerning late-night snacking and weight gain, the first being our metabolism slows down as we sleep. This suggests if we eat right before bed, those calories burn at a slower rate than snacks we have during the day — not the case. Recent studies have found the metabolism slows very little at night, if at all. And even if it did, the energy used to keep our heart, lungs, and brain all active is a calorie burner.

The second theory considers the physiological effect elevated insulin levels have on storing fat, in that the food we eat later at night is stored as fat due to higher levels of insulin in the bloodstream. While it is true insulin levels are significantly lower in the morning, research shows no difference in levels during the day and at night. So gaining weight from the food we eat with those elevated levels could apply to anything we eat after breakfast.

Similar to this, the third theory focuses on how the body stores carbohydrates. The carbs we don’t use are stored as glycogen — but if glycogen levels are full, then carbs will store as fat. The idea the time of day determines how we store carbs is also unfounded. All this to say it’s not so much what we eat before bed, but the kind of food we eat before bed.

If our midnight snack is consistently high in calories and sugar, it could eventually lead to weight gain, especially if we’re not burning some of that off when we are awake.

Follow along as Picture Fit explains each theory in depth in the video above.