It’s not the first time that marijuana has proven effective in taking the place of pharmaceutical drugs, but it is another encouraging sign that it can replace certain side effects-plagued prescription drugs. A newly released study shows that sales of over-the-counter sleep aids dropped immediately after the legalization of cannabis in Colorado.

The investigation was conducted by the University of New Mexico and California Polytechnic State University. It studied grocery store scanner data in tracking the numbers of sleep aids that were bought between December, 2013 and December, 2014. Cannabis was legalized in the state in November, 2012 by state amendment 64, and dispensaries started opening across the state soon after.

According to the new study’s results, access to marijuana caused state residents to buy less diphenhydramine, an active ingredient in Benadryl, and doxylamine-based sleep aids like Unisom. The difference became more pronounced as more dispensaries opened in particular counties.

“The negative association between cannabis access and sleep aid sales suggests a consumer preference for cannabis,” concludes the summary of the investigation, which is available online.

Cannabis As Sleep Aid

Cannabis has long been used as an aid in getting a good night’s sleep. Though studies have shown that THC can result in a loss of REM, which can cause a lack of dreams, it has also been suggested to cause longer and more uninterrupted rest as compared to melatonin sleep aids.

Last year, an investigation was published that suggested that Dronabinol, a synthetic cannabinoid that has been approved by the FDA, can be helpful in treating sleep apnea. Patients in the study who took Dronabinol reported that they felt less fatigue and had fewer troubling symptoms related to their condition.

According to the latest Colorado study, cannabis consumers have become aware that they can swap out their over-the-counter sleep aids. That would not be the only instance in which cannabis has been shown to curb the use of other drugs. One 30-month study found that many patients were able to cut down on their use of illegal opioids to treat their chronic pain once they started using medicinal marijuana. In fact, the drop in illicit opioid use was somewhat dramatic — individuals proved 50 percent less likely to use illegal opioids every day when they had a daily cannabis habit.

Presidential candidate Beto O’Rourke made mention of just this phenomenon during the Democratic Party presidential debates in October, after relating an anecdote about a vet who had entered into danger of becoming addicted to opioids.

“Now imagine that veteran, instead of being prescribed an opioid, had been prescribed marijuana, because we made that legal in America [and] ensured the VA could prescribe it,” the politician said, earning an audible kudos from his opponent Andrew Yang.

Opioids claim the lives of two out of three people who die from a drug overdose in the United States, and casualties related to the drugs have increased by a factor of six since 1999, according to the National Center for Health.

The sleep aids that saw a drop in popularity after Colorado’s legalization were mainly antihistamines, part of a global industry that was valued at nearly $60 billion in 2018.