Eczema risk was reduced by 22 per cent in children whose mothers took a probiotic supplement between 36 and 38 weeks of pregnancy.
Adding beneficial bacteria to the diet during the first three to six months of breastfeeding had the same effect.
The findings come from one of the biggest investigations of maternal diet and childhood allergy ever undertaken.
Scientists pooled data from more than 400 studies involving 1.5 million mothers and their children.
While clear benefits were seen from fish oil and probiotics, there was no evidence that avoiding potentially allergy-triggering foods such as nuts, dairy produce and eggs during pregnancy had any effect.
Lead researcher Dr Robert Boyle, from Imperial College London, said: “Food allergies and eczema in children are a growing problem across the world.
“Although there has been a suggestion that what a woman eats during pregnancy may affect her baby’s risk of developing allergies or eczema, until now there has never been such a comprehensive analysis of the data.
“Our research suggests probiotic and fish oil supplements may reduce a child’s risk of developing an allergic condition, and these findings need to be considered when guidelines for pregnant women are updated.”
Allergies to foods such as nuts, egg, milk or wheat affect around one in 20 children in the UK.
They are the result of the immune system overreacting to harmless substances, leading to symptoms such as rashes, swelling, vomiting and wheezing.
Eczema, also thought to involve an overactive immune response, affects around one in five children in the UK and causes dry, cracked and itchy skin.
People who suffer from eczema are also more likely to have allergies.
More work is needed to understand how fish oils and probiotics may protect against allergies and eczema, according to study co-author Dr Vanessa Garcia-Larsen, also from Imperial College.
She said: “Despite allergies and eczema being on the rise, and affecting millions of children, we are still hunting for the root causes of these conditions, and how to prevent them.
“This study has provided clues, which we now need to follow with further research.”
The new findings appear in the latest issue of the online journal Public Library of Science Medicine.
Previous studies have suggested that omega-3 fatty acids in fish oil may help to dampen down an overactive immune system.
Probiotics, taken in the form of capsules, a powder or a health drink, contain live bacteria that may influence the natural balance of microbes in the gut.
Scientists have linked the disruption of naturally occurring gut “flora” to allergy risk.
Commenting on the research, Seif Shaheen, professor of respiratory epidemiology at Queen Mary University of London, said: “More definitive answers on the possible role of maternal probiotic and fish oil supplementation in the prevention of childhood allergic disease can only come from further large trials, which follow up the children to school age.
“If such trials are big enough they may be able to identify particular subgroups of mothers and children who would benefit most from these interventions.”