Smoke a lot of weed as a teenager, and when you reach adulthood you’ll be more likely to have trouble falling or staying asleep, according to a new CU Boulder study of more than 1,800 twins.

The study, published in the journal Sleep, comes at a time when cannabis—in everything from THC-infused gummies to prerolled joints and high-potency vape pens—is increasingly being marketed as a sleep aid in states where marijuana is legal. It adds to a growing body of evidence suggesting that while it may help some users fall asleep occasionally, chronic use can have negative long-term consequences, particularly for the young.

“People tend to think that cannabis helps with sleep, but if you look closely at the studies, continued or excessive use is also associated with a lot of sleep deficits,” said lead author Evan Winiger, a graduate student in the Institute for Behavioral Genetics. “Our study adds to that literature, showing for the first time that early use is associated with increased rates of insomnia later on.”

For the study, Winiger analyzed data from 1,882 young adults from the Colorado Twin Registry, which has been following twins for research since 1968. Each had completed surveys about their sleep habits, marijuana use and mental health.

They found that about one-third of subjects who started using marijuana regularly before age 18 had insomnia in adulthood, compared to less than 20% among those who didn’t use cannabis regularly as teens. The same pattern held true for a particularly hazardous form of insomnia known as “short sleep” (sleeping fewer than six hours per night on a regular basis). About one in 10 subjects who used cannabis regularly as teens grew up to be short-sleepers, while only about 5% of non-users did.

People who started using marijuana after they turned 18 also had slightly higher rates of insomnia in young adulthood. And these patterns persisted when controlling for depression, anxiety and shift work (which can all also impair sleep).

Lasting impacts on developing brains

Exactly why early cannabis use correlates with later sleep problems remains unclear, but several theories are emerging.

As Winiger explains, the human body has its own endocannabinoid system, producing chemicals much like the cannabinoids (CBD and THC) present in marijuana that bind to cannabinoid receptors in our brains and have been shown to influence our cognition, emotions and circadian rhythm—or body clock.

“One theory is that these receptors are being desensitized or disturbed from all the cannabis use at a time that the brain is still developing, and that leads to waking issues later,” he said.

It could also be that cannabis use in adolescence leads to structural changes in the brain. (Previous brain imaging studies have shown it can alter the developing prefrontal cortex.)

Or chronic use may set teens up for poor sleep habits when they are young, which linger into adulthood.

Genes may also be at play.

By looking at 472 identical twin pairs (who share 100% of their genetic makeup) and 304 fraternal pairs (who share only 50%), the researchers were able to infer to what degree the traits were inherited. They concluded that many of the same genes that contribute to the risk of early cannabis use are also associated with insomnia and insomnia with short sleep.

This is the first study to find a direct genetic correlation between cannabis use and insomnia.

In short, it remains a chicken-and-egg question.

“It is possible that sleep problems could influence cannabis use, cannabis use could influence sleep problems, or common genetics could be responsible,” the authors wrote.

Co-author Ken Wright, director of the Sleep and Chronobiology lab, says the study does not necessarily mean all strains of marijuana are bad for sleep in all people all the time. Some previous studies show cannabis can help people fall asleep if used occasionally.

“The evidence in adults is quite mixed, and unfortunately we currently do not have evidence from randomized controlled trials with different strains and different doses,” Wright said, pointing to federal laws that prohibit researchers from handling cannabis, providing it to subjects or being present while subjects use it.

What he can say now is this:

“We would not recommend that teenagers utilize marijuana to promote their sleep. Anytime you are dealing with a developing brain you need to be cautious.”