FRIDAY, Oct. 21, 2016 (HealthDay News) -- Why can some people enjoy a cup of coffee just before bed and sleep peacefully, while others lie awake for hours?

A new study suggests genes may hold the answer.

"Each of us could be potentially responding to caffeine differently, and it's possible that those differences can extend beyond that of caffeine," said study author Marilyn Cornelis. She is an assistant professor in the department of preventive medicine at Northwestern University Feinberg School of Medicine in Chicago.

In earlier research, Cornelis linked variations in genes to patterns of coffee consumption. In the new study, she looked for connections between these gene variations and chemicals that appear in the blood after people consume caffeine.

She found that gene variants linked to lower levels of caffeine chemicals -- which suggest faster caffeine metabolism -- are the same variants previously linked to higher levels of coffee consumption.

Cornelis' team also came across something unusual: a gene that may be connected to both caffeine metabolism and the metabolism of glucose and lipids.

"How this gene relates to both caffeine metabolism and caffeine-seeking behavior is unclear but worthy of further study, given its link to several health outcomes," Cornelis said in a university news release.

In the big picture, she said, "the study further re-emphasizes the notion that not everyone responds to a single cup of coffee or other caffeinated beverage in the same way."

The study findings are based on an analysis of caffeine chemicals and genes in almost 10,000 people of European descent.

The study was published recently in the journal Human Molecular Genetics.

More information

For more about caffeine, try the U.S. National Institute on Drug Abuse.