The researchers say in their study involving pigs, they found if the mother's diet contains a certain group of polyunsaturated fatty acids, such as those found in fish or walnut oil, the baby's gut develops differently.
The fatty acids are thought to improve how gut immune cells respond to bacteria and foreign substances, making the baby less likely to suffer from allergies.
Dr. Gaelle Boudry of the Institut National de la Recherche Agronomique, a public research institution in Rennes, France, and colleagues say supplementing a mother's diet with n-polyunsaturated fatty acids caused the newborn's gut to become more permeable. A more permeable gut enables bacteria and new substances to pass more easily through its lining into the bloodstream.
These substances then trigger the baby's immune response and the production of antibodies, Boudry says.
"The end result is that the baby's immune system may develop and mature faster -- leading to better immune function and less likelihood of suffering allergies," Boudry says in a statement.
"Other studies have found that a diet containing fish or walnut oil during pregnancy may make your baby smarter -- our research adds to this, suggesting such supplements also accelerate the development of a healthy immune system to ward off food allergies."
The findings are published in The Journal of Physiology.