Sleep deprivation doesn’t only leave you drowsy—it may also cause you to overeat unhealthy foods, according to a study presented at an American Heart Association conference in Atlanta and reported by Health.com.

For the study, researchers supervised two six-day lab sleep sessions of 26 volunteers (13 male, 13 female) between ages 30 to 45. All participants were healthy sleepers of normal weight. During the first sleep session, participants snoozed for nine hours each night. For the other sessions, researchers restricted the volunteers to just four hours of shut-eye. Plus, they couldn’t leave the lab or nap.

In addition, for the first four days participants could only eat a fixed diet of cereal and milk in the morning and frozen entrees for lunch and dinner. But on the last two days of the study, they could choose what they ate. What’s more, scientists gave them an allowance on the last two days and took them shopping with one restriction: They had to buy food with nutritional information on the package so researchers could properly measure its nutrient values.

The result? Volunteers gravitated toward high-fat, high-protein foods (think ice cream) when sleep deprived. Women consumed an average of 329 calories more when sleep deprived than when well rested. (Men consumed 263 more calories when missing sleep.)

“High-fat food is tempting, and maybe on short sleep you can’t restrain yourself as well, while on full sleep you can resist more easily,” said Marie-Pierre St. Onge, PhD, a research associate at Columbia University’s New York Obesity Research Center, and the study’s lead researcher.

This study shows a possible explanation to the link between getting insufficient sleep and being overweight, which has been shown in previous studies, St. Onge said.

But because of the study’s small sample size, it’s impossible to draw any definite conclusions, scientists said, so more research is needed.

Click here to learn how night owls tend to pack on the pounds too.