Your scary dreams might signal something seriously awesome: People who suffer more nightmares may be more creative than those who dream without terror, a recent Canadian study suggests.

The researchers asked nightmare sufferers and happy dreamers to react to emotionally charged words with the first response that came to mind.

They found that nightmare-free sleepers responded with predictable words, like “joy” in response to “happy,” or “mad” in response to “angry.”

But those who experienced nightmares at least twice a week made more creative associations.

“They responded to the word ‘angry’ with words like ‘red’ and ‘face,’” says lead study author Michelle Carr, Ph.D.(c), of the Dream & Nightmare Laboratory at the Hôpital du Sacré-Coeur de Montréal. “Their minds didn’t follow common patterns of thinking.”

That shows their brains were able to come up with a logical response different from what would generally arise from a more conventional thought process—a clear sign of creativity.

The common link between creativity in waking life and nightmares during sleep might be heightened sensitivity, she says.

Creative people tend to experience events on a much deeper level. They’re much more attuned to their emotions and senses, which may allow them to think and express feelings in less-ordinary ways.

The result? When you’re asleep, that insight translates into vivid, intense, and imaginative dreams, she says.

Vivid dreams aren’t necessarily a bad thing: But if you’re stressed or anxious, they can take a negative turn, leading to what we perceive as nightmares instead.

How to Stop Your Nightmares

You can kick your bad dreams to the curb with an at-home technique known as imagery rehearsal therapy, Carr says.

Review a recent nightmare while awake, but re-script the outcome to a more desirable, happy ending, she says.

Rehearse this revised nightmare in your mind for about 20 minutes in one session during the day and again briefly right before going to sleep.

Your nightmares should become less intense, and the theme itself will change—the outcomes should gradually become less negative and eventually even positive, as in the rehearsed ending, Carr explains.

But if you are still bothered by nightmares—your nightmares do not improve, you still wake up from them in a panic, and you still fear sleep because of the likelihood of a nightmare—it’s time to loop in your doctor.

He or she may recommend a sleep medicine specialist to analyse your sleeping habits, or a psychologist to explore any underlying causes of your nightmares.