Scientists have found new links between insomnia and genetic coding, suggesting that for those who struggle with a long-term sleeping problem, part of the reason could be the genes you were born with.

In total, seven genes were linked to insomnia risk, and these genes have previously been associated with conditions related to the chronic sleeping disorder, such as anxiety, depression, neuroticism, and a low sense of wellbeing.

According to researchers from the Vrije Universiteit Amsterdam in the Netherlands, the findings could open the door to new types of treatment for insomnia, and a better understanding of why some of us don't drift off when our heads hit the pillow.

"Insomnia is all too often dismissed as being 'all in your head'," says one of the researchers, Eus Van Someren. "Our research brings a new perspective. Insomnia is also in the genes."

The team looked at samples from 113,006 individuals to identify the seven genes, using what's known as a genome-wide association study (GWAS) approach - a technique where large amounts of genetic data are scanned together to spot patterns that could be associated with a trait.

In this case, seven such variations were linked to insomnia because they were found to be more common in people with the condition than those without.

The genes highlighted by the research are responsible for some fundamental biological processes - both the production of RNA from DNA (transcription), and the way cells communicate with their environment (exocytosis).

One of the genes, MEIS1, is already linked to two sleep disorders - Periodic Limb Movements of Sleep (PLMS) and Restless Legs Syndrome (RLS) - and the team says future studies should look at a potential genetic overlap for these sleep problems.

The researchers did find some differences in genetic variations linked to insomnia between men and women, suggesting that certain biological mechanisms could lead to sleep problems depending on your gender.

In total, between 10 and 22 percent of adults around the world are estimated to have problems with insomnia, and the root causes of the condition remain unclear.

Stress, travel habits, poor sleep patterns, and eating too much in the evening are all thought to contribute.

Insomnia has also been linked with mental illness and underlying sleep disorders. The researchers say there could be a "shared genetic basis" between some of these health problems, based on their findings.

It's still too early to say what the relationship is between these seven genes and other factors that contribute to insomnia, but it's another step towards a better understanding of sleeplessness.

With better understanding can come more personalised and effective treatments... and then we can all get a good night's sleep.

The research has been published in Nature Genetics.