People with the gene ABCC9 need almost 30 minutes more sleep each night than normal, say scientists.
Over 10,000 people from different parts of Europe took part in the study, each reporting how long they slept and providing a blood sample for DNA analysis.
When the researchers from the University of Edinburgh and Ludwig Maximilians University in Munich compared these figures with the results of the genetic analysis, they found those with a variation of a gene ABCC9 needed more sleep than the eight-hour average.
The gene ABCC9 is involved in sensing energy levels of cells in the body.
"A tendency to sleep for longer or shorter periods often runs in families despite the fact that the amount of sleep people need can be influenced by age, latitude, season and circadian rhythms," the BBC quoted Dr Jim Wilson, from the University of Edinburgh's Centre for Population Health Sciences as saying.
"These insights into the biology of sleep will be important in unraveling the health effects of sleep behaviour," he said.
The study will be published in the journal Molecular Psychiatry.