A new study shows that eating foods like cottage cheese before bed could actually help you lose weight—here's why.

Eating late at night isn’t great for your diet, and there are all sorts of tips and tricks people turn to in order to avoid unnecessary snacking after dinner. But sometimes you can't help but reach for a snack because you're actually hungry—and it turns out that choosing to snack on protein-rich food, rather than empty calories (think: chicken breast versus potato chips), is much better for you, says Jamie Vespa, MS, RD.

A new study shows there could be other benefits to eating a protein-rich snack at night—like jumpstarting your metabolism, building muscle tone, and boosting overall health.

The report comes from researchers at Florida State University and suggests that eating protein-packed snacks before bedtime won't result in increased body fat, but rather have a positive effect on the body's metabolism—especially if you eat 30g of protein within half an hour of heading to bed. Their findings will be published in the British Journal of Nutrition early next month.

To understand how the body processes natural protein sources (versus protein shakes or supplements), researchers asked a group of active women in their 20s to eat cottage cheese 30 to 60 minutes before bedtime. The team found that strong sources of protein (like cottage cheese) won't help you lose weight, but they will help your body build lean muscle instead of fat.

More on how snacking at bedtime can affect your health:

"Until now, we presumed that whole foods would act similarly to the data on supplemental protein, but we had no real evidence," said Michael Ormsbee, associate professor of nutrition, food and exercise sciences, in a university release.  "This is important because it adds to the body of literature that indicates that whole foods work just as well as protein supplementation, and it gives people options for pre-sleep nutrition that go beyond powders and shaker bottles."

Many experts believe everyone's metabolism is unique, and that age is a factor in metabolism changes. This study was conducted on young women who were physically active, so it’s worth noting that exercise could also be a factor in how the body responds to late-night snacking.

You may already know that high-protein diets are linked to reduced levels of hunger hormones, and protein helps you feel fuller for longer. Interestingly enough, this study shows that you don't need to eat a ton of extra protein at bedtime to see benefits—for example, there are almost 30g of protein in a cup of 2% cottage cheese.

Bottom line? The next time your midnight cravings strike, don’t reach for that carton of ice cream—opt for protein-rich foods instead.