The amount of time people spend sleeping is linked with two regions of their DNA, a new study suggests.

In the study, researchers examined data from more than 47,000 people of European ancestry who were participating in ongoing studies in Europe, the United States and Australia, and nearly 5,000 African-Americans. The researchers compared people's genetic information with how long they reported sleeping on an average night.

The results revealed two regions of DNA that might be related to how long a person usually sleeps.

The first of the two regions was associated with longer-than-average sleeping times, the new study showed. In previous research, this region has also been linked with better glucose metabolism and a lower likelihood of attention deficit hyperactivity disorder. The other region was associated with shorter-than-average sleeping times, and previous studies had linked it with an increased risk of depression and schizophrenia.

"Sleep patterns are influenced by genetic differences," said study author Dr. Daniel Gottlieb, the director of the Sleep Disorders Center at VA Boston Healthcare System. "This study is one of the first to begin identifying these genetic differences, and will hopefully help us better understand the causes of sleep disorders and their relation to other important conditions, such as diabetes and psychiatric disorders." [5 Things You Must Know About Sleep]

Previous research has linked both sleeping too much and sleeping too little with health problems such as obesity, diabetes, hypertension, heart disease, psychiatric illness and even premature mortality, according to the study. For example, in a 2013 study published in the journal PLOS ONE, researchers found that the risk of type 2 diabetes was 30 percent higher in people who slept less than six hours per night, compared with the risk in people who slept seven hours.

In an October 2013 study, researchers at the Centers for Disease Control and Prevention found that sleeping either less than six hours or more than 10 hours per night was linked with a great risk of coronary heart disease, stroke, and diabetes and obesity, compared with getting seven to nine hours of sleep a night. And, in a study published in February 2013 in the journal Sleep, researchers found that people who got less than six hours of sleep per night had an increased risk of dying prematurely.

The researchers do not know what underlying mechanisms may explain the observed association between sleep duration and the two genetic regions identified in the new study, Gottlieb said."This will require more detailed study of these regions of DNA," he said.

However, the researchers speculated that the first gene region identified in the study (the one associated with longer sleep duration) may influence sleep patterns by regulating thyroid hormone levels. The DNA region is located close to a gene called PAX8, which is involved in thyroid development and function. Moreover, people with hypothyroidism a condition in which the thyroid gland does not produce enough thyroid hormones are prone to excessive sleepiness, whereas those with hyperthyroidism (in which the thyroid makes too much of the hormone) may have insomnia, the researchers wrote in the study.

However, because the timing and duration of sleep are strongly influenced by environmental factors such as work schedule and other social demands, "large numbers of individuals must be studied in order to separate out genetic influences," Gottlieb said.

The new study was published today Dec. 2 in the journal Molecular Psychiatry.

Copyright 2014 LiveScience, a TechMediaNetwork company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.