Whether you’re a morning person has long been tied to personality, but new research suggests DNA inherited from our extinct Neanderthal cousins ups the chance we’re early risers.

Our circadian rhythms—the biological clocks inside our cells that time when we sleep and wake—are linked to countless genes. Now researchers say they have found that bits of genetic code passed down to some of us from Neanderthals relate to our sleeping habits in the present day. The study was published Thursday in the journal Genome Biology and Evolution.

“We’ve found many Neanderthal variants that consistently associate with a propensity for being a morning person,” said Tony Capra, an evolutionary geneticist at the University of California, San Francisco and co-author of the new work. “Their effects are in the context of hundreds of other genes, but it is suggestive there is something meaningful about this.”

Capra and his colleagues compared genes from people alive today and DNA from Neanderthals and another extinct relative known as a Denisovan to spot the pattern. Their findings suggest ancient interbreeding between these groups helped our ancestors adapt to changing environments as they spread across the globe.

This study shows that our genomes are a mosaic of different ancestries, shaped by thousands of years of evolution and mating, according to Serena Tucci, an assistant professor of anthropology and evolutionary biology at Yale University who wasn’t involved in the study, which she called “fascinating.”

Even if some of these groups have been extinct for tens of thousands of years, she said, “somehow they still survive today in our genes. They left something behind that still influences our biology today.”

Modern humans of European or Asian descent inherited about 2% of their genetic material from Neanderthals. The first Homo sapiens emerged around 300,000 years ago in Africa, and some left the continent around 70,000 years ago. As they moved into Eurasia and encountered the Neanderthals and the Denisovans, the different species mingled.

For the new study, researchers examined a U.K.-based electronic database containing health and genetic information from hundreds of thousands of people of European ancestry and the DNA from several Neanderthals and one Denisovan, extracted from fossilized bones and teeth.

The study authors identified 246 genes associated with circadian rhythms, and found that dozens of those genes had variants that differed between modern humans and Neanderthals. They found that people within the U.K. database who had specific variants from Neanderthals had self-reported their preference for waking up early by selecting the descriptors “definitely a ‘morning’ person” or “more a ‘morning’ than ‘evening’ person.”

It is plausible some genetic sequences that we inherited from Neanderthals contribute to circadian traits, according to Joshua Akey, a Princeton University geneticist who wasn’t involved in the study. But he warned the rhythms of our sleep are biologically complex.

“It is probably not something where you can completely ascribe whether you’re a morning or night person to Neanderthal ancestry,” he said.

Effects on sleeping and wakefulness aren’t the only modern-day traits that scientists think are linked to DNA from Neanderthals and Denisovans. Increased tolerance to low oxygen levels at high altitudes, a greater risk for severe Covid, and more susceptibility to certain diseases are also on the list.

This new work is part of a growing body of research that examines how the genes our species inherited from Neanderthals play a role in human health today. Such research represents a big leap forward in the field of paleogenetics.

“Like 10 years ago, people were still fighting about whether or not humans and Neanderthals admixed at all,” Akey said. Work on analyzing ancient DNA from these extinct cousins was awarded a Nobel Prize last year.

Capra said previous research has found that being early to bed and early to rise is linked with having biological clocks that are quicker to adapt to changes in natural cycles of daylight and darkness.

Circadian rhythms vary across people, he said, “and if your clock is running faster, in essence, it can detect differences more quickly, and then reset more quickly to align with those external timing cues. But that also has a side effect of you generally waking up earlier.”

The researchers predicted that such adaptability was likely beneficial at higher latitudes, where Neanderthals and Denisovans lived—environments closer to the North Pole with more variable daylight throughout the year than parts of Africa where our Homo sapiens ancestors first evolved.

Our genomes evolved largely in regions that didn’t have huge variation in light-dark cycles, “so that just wasn’t something their clocks needed to anticipate,” he said. But when human ancestors moved out into the rest of the world 70,000 years ago, they encountered dramatically different environments in terms of light exposure, temperature and seasonality.

A better understanding of how our ancestors—and their genomes—evolved in response to those changing environments could help physicians and scientists apply that knowledge to help people today. Graveyard shifts and bright lights from cities, hand-held devices and computers are skewing our cycles of waking and sleeping based on light from the sun, Capra said. Being out of sync can have an impact on our relationship with mental health, cancers and metabolic diseases.

“In modern environments we are really beginning to appreciate how detrimental to our health it can be to be misaligned with our environmental light-dark cues,” Capra said.

The new work, he added, will shed more light on how people with different genetic variations that influence circadian rhythms “might be better- or worse-suited to certain types of behaviors or exposures.”

Write to Aylin Woodward at aylin.woodward@wsj.com