A new study suggests that depression and insomnia are the strongest risk factors for having frequent nightmares.

The study involved 13,922 adults. They ranged in age from 25 to 74 years. All of the study subjects answered a series of questions about their health.

Results show that nearly 4 percent of adults had frequent nightmares during the past 30 days. These nightmares were more common in women than in men.

People with depression or insomnia had the highest risk. About 17 percent of people with frequent insomnia reported having frequent nightmares. More than 28 percent of those with severe depressive symptoms also had frequent nightmares. Another risk factor for nightmares was exhaustion.

“Our study shows a clear connection between well-being and nightmares,” said lead author Nils Sandman. He is a researcher in the Centre for Cognitive Neuroscience at the University of Turku in Finland.

Nightmares are disturbing dreams that seem vivid and real. They usually involve threats to survival or security. Nightmares also tend to evoke emotions of anxiety, fear or terror. A nightmare can wake you from sleep and make it hard to fall back asleep.

Insomnia is the most common sleep complaint. It involves having trouble falling asleep or staying asleep. It also occurs when you wake up earlier than desired. About 10 percent of people have chronic insomnia disorder.

Learn more about the study in the journal Sleep: Nightmares: Risk Factors Among the Finnish General Adult Population.