(CNN) More pregnant women seem to be using pot -- sometimes to ease the nausea of morning sickness or heightened anxiety -- and a new study suggests that this slight rise in marijuana use is most pronounced among those younger in age.

The prevalence of marijuana use among a sample of moms-to-be in California climbed from 4.2% to 7.1% from 2009 through 2016, according to a research letter published in the journal JAMA on Tuesday

Among pregnant teens younger than 18, marijuana use climbed from 12.5% to 21.8%, and among women 18 to 24, marijuana use climbed from 9.8% to 19%, the researchers found.

That research involved only certain women in California, but a separate study of pregnant women across the United States, published in JAMA in January, found that those who reported using marijuana in the previous month grew from 2.37% in 2002 to 3.85% in 2014. The women were 18 to 44.

Doctors caution that the health effects of marijuana on a fetus remain unclear but could include low birth weight and developmental problems , according to the US Centers for Disease Control and Prevention . Many of the chemicals in marijuana, like tetrahydrocannabinol, known as THC, could pass through a mother's system to her baby.

The American Congress of Obstetricians and Gynecologists recommends that "women who are pregnant or contemplating pregnancy should be encouraged to discontinue marijuana use" and "to discontinue use of marijuana for medicinal purposes in favor of an alternative therapy."

Additionally, "there are insufficient data to evaluate the effects of marijuana use on infants during lactation and breastfeeding, and in the absence of such data, marijuana use is discouraged," according to the recommendations.

Why more pregnant women are using weed

The new research involved 279,457 mothers-to-be, 12 and older, who were in the Kaiser Permanente Northern California health care system. The study participants completed questionnaires about their marijuana use and took a cannabis toxicology test during their standard prenatal care visits from 2009 through 2016.

The women were screened for marijuana use at approximately eight weeks' gestation.

The researchers found that the prevalence of marijuana use, based on self-reports or toxicology results, soared among all age groups, but the biggest rise was among those 24 and younger.

"We were concerned to find that the prevalence of marijuana use in pregnancy is increasing more quickly among younger females, aged 24 and younger, and to see the high prevalence of use in this age group," the study's lead author, Kelly Young-Wolff, licensed clinical psychologist and research scientist at the Kaiser Permanente Northern California Division of Research, wrote in an email.

For other age groups, the researchers found that marijuana use rose from 3.4% to 5.1% among women 25 to 34 and from 2.1% to 3.3% among women older than 34.

JUST WATCHED Getting clean while pregnant Replay More Videos ... MUST WATCH Getting clean while pregnant 06:23

For instance, moms-to-be younger than 18 years were only 1.4% of the overall sample in the study, but 18 to 24 were 15.8%, 25 to 34 were 61.6%, and older than 34 were 21.2%.

Additionally, "we were unable to distinguish prenatal use before versus after women realized they were pregnant," Young-Wolff wrote.

"Marijuana is detectable in urine approximately 30 days after last use and this varies with heaviness of use and marijuana potency," she said. "it is possible, but unlikely, that some toxicology tests identified prepregnancy use."

The findings also were limited to data on pregnant women within one health care system in a limited geographic area of California.

All in all, "the paper is not surprising, and the findings of a rise in marijuana use during pregnancy is consistent with recent attention to marijuana and legalization in various states," said Dr. Haywood Brown, professor of obstetrics and gynecology at Duke University School of Medicine, who was not involved in the new study.

An advantage of the study, he added, was that women not only self-reported marijuana use but also were screened for marijuana -- and he thinks the study findings are age-related, as the largest increase in marijuana use was among adolescents and young adults.

As the study showed the highest increase in marijuana use among women 24 and younger, that age group might hold clues as to why there has been an overall increase, said Dr. Robyn Horsager-Boehrer, professor and chief of obstetrics and gynecology at the University of Texas Southwestern's William P. Clements Jr. University Hospital.

"Think about marijuana use from their perspective, especially in Northern California. California legalized medical marijuana use in 1996 , so they have grown up with the idea of it not only not being illegal but being a medical therapy," said Horsager-Boehrer, who was not involved in the study.

"With the proximity to Oregon and Washington, they also have experience with any use being legal," she said. "So I think the idea that use is rising is just because of the greater legal exposure to marijuana that women have today versus 20 years ago."

Young-Wolff noted in her email that the study itself did not investigate reasons for the rise in marijuana use among pregnant women.

Doctors warn against drinking, too

Along with advising against marijuana use, doctors have long advised pregnant women to avoid drinking alcohol during pregnancy.

As it turns out, the research remains unclear as to just how little a pregnant woman could drink without harming her child.

But doctors in the US warn that drinking any alcohol while pregnant could come with medical risks, such as the possibility of miscarriage, stillbirth, or physical and behavioral problems in the baby.

Guidelines in the United Kingdom also note that if you are pregnant or thinking about becoming pregnant, the safest approach would be not to drink alcohol at all

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

"I have found that women frequently fall into two groups during pregnancy. There are those who want to reduce risks of bad things happening to as close to zero as possible and improve outcomes any way they can. These women start folic acid, lose weight and reduce medication exposure of any kind before becoming pregnant. They absolutely don't smoke, drink or use any drugs during pregnancy," said Horsager-Boehrer, who is an editor of the Your Pregnancy Matters blog.

"Then there's the other group who take a more pragmatic view of pregnancy. They know there are potential risks involved with many decisions they make involving medication exposure, alcohol use and smoking, but they decide those risks are acceptable, especially if the risks are not well-defined or conclusive," she said.

"For individual patients, I think they need to ask themselves what their goals are for the pregnancy and how they are going to achieve them -- essentially make a decision on which camp they are going to be in," she said.