When we think of lifestyle habits that could conceivably contribute to a cancer diagnosis, UV rays, smoking, and other obviously risky practices are at the top of the list. But what if going to bed too soon after dinner was a factor, too?

That's what researchers at the Barcelona Institute for Global Health are advising against after completing a study demonstrating that dinnertime could have an impact on a person's risk of breast and prostate cancers. The paper, published this week in the International Journal of Cancer, asserts that study subjects who ate their last meal at least two hours prior to their bedtime had a 20 percent lower chance of developing these potentially deadly conditions.

The subjects, all located in Spain, were followed from 2008 to 2013 and divided among people who had been diagnosed with one of the two cancers (1826 people) or who were cancer-free (2193 people). They were profiled based on their meal timing, sleep habits, and chronotype—whether they were more active in the mornings or evenings. Eating prior to 9 p.m., or at least two hours before going to sleep, was associated with lower instances of both an initial cancer diagnosis and recurrence.

Why should the timing of your meals matter as much as what's actually on your plate? The authors theorize that consuming a meal too close to sleep influences how the body metabolizes food. By "fasting," or allowing for a longer window for the body to go without food, people can reduce their risk of obesity and a poor metabolic profile, both contributors to a variety of health conditions.

Though the authors say the two groups ingested similar diets and had no wide variations in other factors like social class, they caution that more work will be needed to help substantiate their findings. Moving research out of Spain—where eating late is common—will allow them to examine populations with different dinner habits.

[h/t CNN]