Imagine drifting off to sleep after indulging in your favorite cheesy snack, only to wake up in a sweat from a terrifying nightmare. Sound familiar? Well, a new study suggests that your midnight cheese cravings might just be the culprits behind those unsettling dreams!

For years, many have whispered that certain foods could lead to bizarre nightmares, but until now, it was mostly speculation. However, researchers such as dream neuroscientist Tore Nielsen from the University of Montreal and Russ Powell, a psychology professor emeritus at MacEwan University, decided to delve deeper into this lingering question. “We were particularly interested in whether cheese might be indicated as one such food as it is often identified in various folklore traditions as resulting in bizarre dreams or nightmares,” Powell explained.

Published in the journal Frontiers in Psychology this June, the findings of their latest correlational study are both fascinating and alarming. They discovered that it’s not just cheese that’s a potential dream disruptor—dairy products in general were frequently identified by students as affecting their dreams. But what about lactose intolerance? Could it be the reason behind those vivid nightmares? According to the research, there’s a significant link between gastrointestinal distress from lactose intolerance and the severity of nightmares.

To conduct their research, they surveyed a whopping 1,082 psychology students at MacEwan University, gathering data on their eating habits, sleep quality, and dream experiences. The results were striking: students who indulged in dairy-rich foods reported more disturbing dreams. Interestingly, they found that desserts and sweets also had a strong association with chaotic dream realms, suggesting that our late-night snacking habits could be influencing our subconscious adventures.

“Dairy placed second,” Powell stated. “We don’t know why there is a difference from the first study, but it may be that the culture in general is becoming increasingly concerned about the unhealthy effects of ‘junk food,’ and students are therefore more inclined to attribute negative outcomes to such foods.”

So what’s a cheese lover to do? Powell recommends opting for hard cheeses like Swiss, cheddar, or lactose-free varieties if you’re keen on enjoying a late-night snack without fear of nightmares. But here’s a twist—some cheese enthusiasts might actually find solace in a little Brie or Cheddar. Other studies have suggested that cheese could potentially help reduce the risk of sleep apnea, a common disorder that disrupts breathing during sleep.

However, if you find yourself plagued by cheese-induced nightmares, it might be wise to switch up your late-night snacks. Researchers found that those who eat healthily tend to experience calmer dreams and better recall of those dreams come morning. “We found that people who engage in healthy eating patterns, which includes not only eating healthy foods but also eating mostly in response to internal feelings of hunger and not eating late in the evening, are less likely to have disturbing dreams,” Powell emphasized.