How do your eating habits influence your sleep? Do you find it hard to fall asleep after a heavy meal, or on an empty stomach? Do spicy foods lead you to have strange dreams? Does a sugary snack before bed help you drift off to sleep, or leave you tossing and turning?

The relationship between eating and sleep is complex. Not only when and how much we eat, but also what we eat may have a real impact on the character of sleep and even dreams. Recently, researchers at Quebec’s Université de Montréal looked at how certain foods and different dietary habits might relate to the quality of sleep and dreams.

Using questionnaires completed by nearly 400 university students, the scientists looked at what, if any foods and dietary habits correlated with poor sleep and with nightmares. In their results, they report identifying several unhealthful eating habits that correlated to poor sleep and to nightmares, including binge eating, emotional eating, and not relying on feelings of hunger or fullness. On the other hand, they found a number of good eating habits correlated with sleeping well and also with vivid—but not disturbing—dreaming. Those healthful habits included adhering to a healthy diet, and allowing for more space between eating meals and snacks.

The scientists also examined the students’ own perceptions of how food influenced sleep and dreaming. Nearly half of the students said they believed the food they ate had effects on their sleep, and roughly 17 percent of students said they thought food influenced their dreams. The foods that students most often blamed for hurting their sleep were food containing caffeine, sugar, dairy, and greasy, fried, and junk foods. They considered beverages (including milk), fruit, meat, and vegetables most helpful to sleep. Students most often blamed dairy products for nightmares, as well as sugary, spicy, and fast food or junk food. did-dinner-give-you-nightmares-post

Sleep experts consider diet and eating habits to be one important contributor to sleep quality. Eating late at night, and eating too much in the evenings may provoke restless, poor quality sleep. Generally, the foods that experts advise are conducive to sleep—lean protein, fruits and vegetables, whole grains, good fats—are also foods that support good overall health. Getting enough rest at night may make it easier to eat well. That’s because sleep plays a role in regulating hormones that control appetite, and may help control cravings for unhealthful foods.

And don’t forget about beverages. Caffeine, alcohol, and sugar all can have significant detrimental effects on sleep and may contribute to bad dreams.

Sleep troubles and unpleasant, difficult dreams can be caused by a number of factors, including stress, medications, and illness. But it’s a good idea, experts say, to consider what, when, and how you are eating when you’re trying to improve your sleep.