They have found evidence that 'industrialised' Western diets high in red meat, sugar and fat lowered the numbers of healthy bacteria in our guts.
Without these microbes to prime the immune system, children are more likely to grow up suffering from asthma, eczema and other allergies, they say.
The number of people with allergies has trebled in the past 20 years. One in three people now suffer at some point in their lives.
Many scientists blame the modern obsession with hygiene and children's indoor lifestyles. Some doctors say exposure to germs and dirt in the early years is essential for a healthy immune system.
Others have linked the rise in allergies to traffic pollution, food additives and the increasingly exotic diets of children.
The new study compared gut bacteria of children living in Florence, Italy, with youngsters raised in a rural village in Burkina Faso, West Africa.
They found that African children - who were eating food similar to the diet of the earliest farmers thousands of years ago - had a far lower proportion of microbes associated with obesity in adults and far more fatty acids known to protect against inflammation.
The diet of the African children consisted mainly of cereals, black-eyed peas and vegetables. The Italians, by contrast, ate higher quantities of meat, fat and sugar.
Dr Paolo Lionetti, who led the study at the University of Florence, said the differences between the children's gut microbes could be explained by their diets, which dominated other factors such as ethnic background, sanitation, climate or geography.
'The Burkina Faso children were selected as representative consumers of a traditional rural African diet,' he said. 'The diet of Burkina Faso children is low in fat and animal protein and rich in starch, fibre and plant polysaccharides, and predominantly vegetarian.
'All food resources are completely produced locally, cultivated and harvested nearby the village by women. Although the intake of animal protein is very low, sometimes they eat a small amount of chicken and termites.'
The trillions of microbes that inhabit the human gut were an essential 'organ' that helped to digest food, protect against pathogens, and reduce the risk of inflammation, he said.
Lindsey McManus, of Allergy UK, said: 'There is some evidence that probiotics in the gut are effective at boosting the immune system, especially in children with eczema and that they can protect against allergies.
'However, it's very early days with this study and a lot more work needs to be done.'