The study found children who suck their thumbs and bite their finger nails may be lowering their chance of developing allergies.
University of Otago fifth-year medical student Stephanie Lynch, who undertook the study as a summer research project, said it was the first in the world to explore the relationship between nail-biting, thumb-sucking and the immune system.
While the habits have traditionally been frowned upon, Dunedin father Victor Billot said his 7 and 4-year-old sons both sucked their thumbs and news of the possible benefits of the habit had changed his thinking about it.
"I have never thought about any benefits of it, but it does make sense.''
Neither of his children had allergies.
Reginald Billot said he had sucked his thumb "every single night'' since he was 1 and he did not intend to stop until he was 10 years old.
The findings are the latest to come from the multidisciplinary study which has followed the lives of 1037 participants born in Dunedin in 1972-73 into adulthood.
Parents of Dunedin study members reported their children's thumb-sucking and nail-biting habits when their children were 5, 7, 9 and 11 years old.
Study lead author Prof Bob Hancox said skin-prick allergy tests when the participants were 13 and 32 years old showed the prevalence of allergies in children who had either habit at 13 years old was 38% compared to 49% in children who did not.
Children who had both habits had a 31% risk of allergy.
The findings remained the same when participants were re-tested when they were 32 years old, despite factors including parental history of allergies and pet ownership.
The findings supported the "hygiene hypothesis'', Prof Hancox said.
"Which suggests that being exposed to microbes as a child reduces your risk of developing allergies.''
Ms Lynch said the study found no difference between those who bit their nails and sucked their thumbs and those who did not when it came to their risk of developing allergic diseases such as asthma and hay fever.
University of Otago head of paediatric dentistry Prof Bernadette Drummond said thumb-sucking did not often impact children if it was stopped before school age. However, it could cause "significant'' orthodontic problems if carried out by older children.