The number of young children and teens hospitalized for overdosing on opioid painkillers have spiked nearly threefold in recent years, a new study finds.

Among children under 10, most of the painkiller poisonings were accidental, with children “eating them like candy,” said lead researcher Julie Gaither, a postdoctoral fellow in biostatistics at the Yale School of Medicine in New Haven, Conn. Among teens, most were accidental overdoses, although some were suicide attempts.

In both age groups, the increase in cases involving painkillers like OxyContin, Percocet and Vicodin was dramatic.

Get Breaking News Delivered to Your Inbox

Among children aged 1 to 4 years, the number of poisonings went up 205 percent from 1997 to 2012. For teens 15 to 19, the increase was 176 percent. Overall, the study showed a 165 percent increase in poisonings from opioid painkillers among those 19 and younger.

In addition, poisonings involving the use of heroin among teens increased 161 percent, while poisonings involving methadone went up 950 percent.

“The opioid crisis affects everyone, and we need to pay better attention to the impact it’s had on children,” Gaither said. “Our study shows they have suffered hard from this epidemic.”

The rates at which narcotic painkillers have been prescribed have increased dramatically, Gaither said, “so we now have opioids in millions of American homes, and children and teens are exposed to them more frequently.”

In August 2015, the U.S. Food and Drug Administration approved the use of OxyContin for children aged 11 to 16, Gaither added. Pediatric cancer patients would be among those who benefit from the FDA approval, doctors said.

Among some teens, these medications are being misused and abused, often for nonmedical reasons -- “to get high, just like they would use any recreational drug,” she said.

To curb this trend, Gaither suggests that parents limit access to these drugs, and to throw out any leftover pills.

Gaither pointed out that as access to narcotic painkiller prescriptions has become more restricted more recently and the costs of these drugs have increased, teens are turning to heroin, which is cheaper and more readily available.

Among teens, a better understanding of what’s driving them to use these drugs is important, as is better access to treatment for depression and addiction, she said.

“One million Americans 12 and older have a substance abuse disorder, so more available treatment is needed,” Gaither said.

To see how much overdoses from prescription narcotic painkillers has risen, Gaither and her colleagues analyzed data from children’s hospitals from 1997 through 2012 that was taken at three-year intervals.

The researchers identified more than 13,000 records of children and teens hospitalized for opioid painkiller poisoning. They also found records of heroin poisoning among teens. In all, just over 1 percent of the children died during hospitalization, the study authors found.

Gaither’s team also discovered that boys accounted for 35 percent of the hospitalizations in 1997, but by 2012 that had grown to 47 percent. Most of the children hospitalized were white (74 percent) and covered by private insurance (49 percent).

When the researchers looked at why these poisonings occurred, they found that 16 cases were attributed to suicide or self-inflicted injury among children younger than 10 from 1997 to 2012.

Among children aged 10 to 14, the incidence of poisonings from suicide or self-inflicted injury rose 37 percent, while the incidence of accidental poisoning increased 82 percent.

Among teens 15 to 19, poisonings from suicide or self-inflicted injury increased 140 percent, while accidental poisoning increased 300 percent, the researchers found.

The report was published online Oct. 31 in the journal JAMA Pediatrics.

Dr. Barbara Pena is research director of the emergency department at Nicklaus Children’s Hospital in Miami. She said, “The only reason opioid poisoning is increasing among children is because opioid prescriptions are increasing among adults.”

Any medicine that’s left out is “toddler-friendly -- they’re going to put it in their mouth,” she said. Parents who are taking a narcotic painkiller should store it where toddlers and teens can’t get to it, “especially if you have a depressed adolescent.”

Teens, however, can get their own prescriptions for narcotic painkillers, Pena said. “Once you mix an adolescent who’s on opioids with depression, you’re mixing two potentially dangerous things,” she said.

Pena said doctors don’t necessarily have to prescribe narcotic painkillers as a first-line therapy. Non-narcotic painkillers may work as well, and parents should question their doctor why a narcotic painkiller is being prescribed and whether a non-narcotic medication would do the job.

“Some kids have chronic pain from conditions such as lupus or sickle cell disease, but to give a kid with back pain opioids is ridiculous,” Pena said.

“Give them some warm packs and Toradol [a non-steroidal anti-inflammatory drug], which has been show to work just as well as opioids without the dependency and without the risk,” she added.