It is well known that stress can cause a stomach ache, but the relationship works both ways, says a pediatrician.
Researchers are starting to show that a bacterial imbalance in the gut can cause mental health problems, says Dr Leila Masson, who specialises in treating children on the autistic spectrum.
Although an imbalance does not cause autism, getting the balance right can help reduce some of the anguish.
"I have repeatedly seen autistic children become more settled and less anxious when this imbalance is resolved," says the New Zealand pediatrician, who is a speaker at the MINDD international conference in Sydney on June 14.
"We are not talking about curing autism. It is about treating some of the problems that come with it."
She says that in the past agitation was seen as a symptom of autism.
"Now we know it is caused by painful inflammation of the gut. If you reduce the pain, children sleep better and are calmer.
"The New Zealand medical guidelines say that children on the autistic spectrum should be examined for gastro-intestinal problems because they have a high rate of problems."
Getting the gut flora balance right will help all autistic children, no matter where they are on the spectrum, she says.
"In fact, it will help all children, whether or not they are autistic."
If a child has been born naturally, exclusively breastfed for six months and has not been given antibiotics, then parents can assume their gut flora will be healthy, she says.
However, partly because of overuse of antibiotics, few children get an optimal start.
Dr Masson believes one way of improving the balance is to eat traditional fermented foods such as sauerkraut, kefir or kimchi.
People can also take commercial probiotics or eat natural unsweetened yoghurt with a good count of probiotics.
"The other way of improving gut flora is to eat a diet of unprocessed food, whole grains and vegetables and fruit.
"The celluloids in fruit and vegetables are prebiotic, which is food for the probiotics. It helps them grow better.
"You want to avoid too much sugar and, if possible, antibiotics."