A new study suggests that the quality of your sleep may be related to the type of food that you eat.

The study involved 26 adults. They had a normal weight and an average age of 35 years.

Results show that greater fiber intake predicted more time spent in the stage of “deep” or slow wave sleep. Higher saturated fat consumption was associated with less slow wave sleep. Greater sugar intake also was associated with more arousals from sleep.

The study also found that participants fell asleep faster after eating fixed meals provided by a nutritionist. The meals were lower in saturated fat and higher in protein than self-selected meals. It took participants an average of 29 minutes to fall asleep after consuming foods and beverages of their choice. It took them only 17 minutes to fall asleep after eating controlled meals.

“This study emphasizes the fact that diet and sleep are interwoven in the fabric of a healthy lifestyle,” said Dr. Nathaniel Watson. He is president of the American Academy of Sleep Medicine.

Prior research also has shown that your sleep may impact what you eat. By sleeping at least 7 hours per night, you’ll be less likely to crave sweet, salty or fatty junk foods.

Learn more about the study in the Journal of Clinical Sleep Medicine: Fiber and Saturated Fat Are Associated with Sleep Arousals and Slow Wave Sleep.