Baby boomers are getting high in increasing numbers, reflecting growing acceptance of marijuana as treatment for various medical conditions, a study published this week in the journal Addiction found.

The findings reveal overall use among the 50-and-older study group increased “significantly” from 2006 to 2013. Marijuana users peaked between ages 50 to 64, then declined among the 65-and-over crowd.

Men used marijuana more frequently than women, the study showed, but marital status and educational levels were not major factors in determining users.

The study by researchers at New York University School of Medicine suggests that more data is needed about the long-term health effects of marijuana use among seniors. Participants said they did not perceive the drug as dangerous, a sign of changing attitudes.

The study was based on 47,140 responses collected from the National Survey on Drug Use and Health.

Joseph Palamar, a professor at the NYU medical school and a co-author of the study, said the findings reinforce the need for research and a call for providers to screen the elderly for drug use. “They shouldn’t just assume that someone is not a drug user because they’re older,” Palamar said.

Growing use of the drug among the 50-and-older crowd reflects the national trend toward pushing cannabis into mainstream culture. More than 22 million people used the drug in 2015, according to the Substance Abuse and Mental Health Services Administration. Seven states have legalized the drug for medicinal use and collect taxes from sales, according to Marijuana Policy Project, a nonprofit advocacy group dedicated to enacting nonpunitive marijuana policies across the United States.

Researchers also uncovered an increasing diversity in marijuana users. Past-year use doubled among married couples and those earning less than $20,000 per year.

More people living with medical conditions also sought out marijuana. The study showed the number of individuals living with two or more chronic conditions who used the drug over the past year more than doubled. Among those living with depression, the rate also doubled to 11.4 percent.

Palamar said the increase among the sick could be attributed to more individuals seeking to self-medicate. Historically, the plant was difficult to research due to a government crackdown on it. The Drug Enforcement Administration classifies the plant as a Schedule I substance, “defined as drugs with no currently accepted medical use and a high potential for abuse.”

Benjamin Han, assistant professor at the New York University School of Medicine and the study’s lead author, fears that marijuana used with prescription drugs could make the elderly more vulnerable to adverse health outcomes, particularly to falls and cognitive impairment.

“While there may be benefits to using marijuana such as chronic pain,” he said, “there may be risks that we don’t know about.”

The varying degrees of legality create the potential of arrest, one of the biggest public health concerns associated with marijuana, Palamar said.