While parents may frown upon their children's tendency to suck their thumbs and bite their fingernails, new research suggests there could well be a positive outcome from these kinds of classic bad habits.

A study of more than 1,000 children by researchers in New Zealand and Canada has found that thumb-suckers and nail-biters are less likely to develop allergic sensitivities – and the benefits appear to be increased if kids indulge in both (slightly gross) oral habits.

"Our findings are consistent with the hygiene theory that early exposure to dirt or germs reduces the risk of developing allergies," said one of the researchers, Malcolm Sears from McMaster University in Canada. "While we don't recommend that these habits should be encouraged, there does appear to be a positive side to these habits."

The team collected their data from the Dunedin Multidisciplinary Study, which tracked 1,037 participants born in 1972–1973 in Dunedin, New Zealand.

Children in the project had their thumb-sucking and nail-biting habits recorded when they were 5, 7, 9, and 11 years old, and were then given a skin prick test at the ages of 13 and 32 for atopic sensitisation – designed to see if they were allergic to at least one common allergen, such as dust mites, grass, or household pets.

The researchers found that 31 percent of children were frequent thumb-suckers or nail-biters, and these kids were less likely to have an allergy (38 percent) at 13 years of age than those who didn't have the oral habits (49 percent). And for kids who both sucked their thumb and bit their nails, the prevalence was even lower (31 percent).

The benefits continued through to when participants were 32 years old, but while the results showed thumb-suckers and nail-biters had lower rates of allergy in the test, they didn't show any associations with asthma or hay fever.

Nor do the researchers know what biological mechanisms are involved that could explain exactly what's happening here – a limitation of the study that its authors freely acknowledge.

"Even if we assume that the protective effect is due to exposure to microbial organisms, we don't know which organisms are beneficial or how they actually influence immune function in this way," respiratory epidemiologist Robert J. Hancox from the University of Otago in New Zealand told Perri Klass at The New York Times.

But while the scientists can't fully explain the results, the findings, published in Pediatrics, could add new weight to the argument that exposure to microbes when we're young helps strengthen the immune system and may result in fewer allergies.

"The hygiene hypothesis is interesting because it suggests that lifestyle factors may be responsible for the rise in allergic diseases in recent decades," Hancox told The New York Times. "Obviously hygiene has very many benefits, but perhaps this is a downside. The hygiene hypothesis is still unproven and controversial, but this is another piece of evidence that it could be true."

"Early exposure in many areas is looking as if it's more protective than hazardous," Sears added, "and I think we've just added one more interesting piece to that information."