Using codeine to treat pain after a tonsillectomy could be fatal for some children, a Canadian doctor warns.

In Thursday's New England Journal of Medicine, researchers report on the case of a two-year-old boy who died after his tonsils were removed.

Enlarged tonsils are usually treated with antibiotics. But tonsillectomies are still done for sleep apnea, where a child stops breathing while asleep, said the study's senior author, Dr. Gideon Koren, a pediatrics professor at London's University of Western Ontario and director of the Motherisk program at the Hospital for Sick Children in Toronto.

The toddler had a history of snoring and sleep apnea that was confirmed at a sleep lab. His mother was given syrup containing codeine and was told how to give it for pain relief after the tonsil surgery.

On the second night after surgery, the boy developed a fever and wheezing. He was found dead the next morning.

Tests later showed the mother gave the proper dose of syrup, but the body contained high levels of morphine.

Codeine is metabolized into morphine and is commonly used for pain relief. Some people carry a genetic mutation that leads them to metabolize codeine at a faster rate and produce significantly higher amounts of morphine that can cause overdoses.

The sudden death was sobering, given that tonsillectomies are done so often, and that increasingly children are sent home the same day, Koren said.

"If the apnea doesn't go away, codeine will also suppress the child's breathing," Koren said in a release. "This demonstrates the need to keep children in hospital under surveillance for at least 24 hours to see if the apnea persists."

The high level of morphine in the boy's blood, 32 nanograms per millilitre, was likely a factor in the death, the researchers said. The boy also developed a lung infection and pneumonia that may have also compromised his breathing.

Given variations in codeine metabolism and the fact that the surgery does not reverse all cases of obstructive sleep apnea, "codeine cannot be considered a safe outpatient analgesic for young children after adenotonsillectomy," the study's authors wrote.

Last year, Koren published a study showing some mothers who are given codeine for pain after childbirth may pass on toxic levels of morphine to their babies through breast milk if they carry a certain genotype.

The estimated prevalence of being a fast metabolizer varies among ethnic groups, from one to 10 per cent for Caucasians to 16 to 28 per cent for North African, Ethiopian and Arab populations, according to Health Canada.