The research is yet more proof that eating a diet rich in olive oil, fruit, vegetables and fish helps keep people healthy.
It followed 468 mothers and their children throughout pregnancy up until the youngsters were aged six and a half.
The women were recruited from general practices in the Spanish island of Menorca over 12 months from mid-1997.
Questionnaires were used to assess the mother's food intake in pregnancy alongside the child's diet by the age of six.
They were scored from 0 to 7 according to how much of their food intake matched a traditional Mediterranean diet, which included nuts and cereals.
Women and children who scored between 4 to 7 were regarded as following a high quality Mediterranean diet while the opposite was true for those who scored less than 4.
Parents also filled in questionnaires on their child's respiratory and allergic symptoms and the youngsters underwent skin prick tests for six common allergens.
Researchers found that those women who had a high Mediterranean diet score during pregnancy (66% of the women) offered the most benefit to their children.
Eating vegetables more than eight times a week, fish more than three times a week and legumes more than once a week seemed to be particularly protective.
However, eating red meat more than three or four times a week seemed to increase the risks.
Just over 13% of children were found to have persistent wheezing, while 17% responded positively to skin test allergens. Almost 6% had asthma-like symptoms plus positive skin test results.
The study, published online in the journal Thorax, was carried out by researchers from Greece, Spain and Mexico.
They suggested that a diet rich in Mediterranean foods in pregnancy could help children by exposing them to a high level of antioxidants.
These could help prevent damage to the lung tissue of developing babies.
They said, "The results of the present study, indicating a protective effect of maternal adherence to a Mediterranean diet during pregnancy on wheeze and atopy (allergy) at age 6.5 years, probably reflect high fetal exposure to several antioxidant compounds and their adverse effect on oxidative stress damage of lung tissues.
"Cereals (particularly wholegrains) are rich in antioxidant compounds (i.e., vitamin E, phenolic acids and phytic acid) and they have been shown to have a protective effect against asthma in children.
"Similarly, fruits, vegetables and legumes are known to be high sources of antioxidants (vitamins C, E, carotenoids, selenium, flavonoids) and may therefore help to protect the airways against oxidative damage."
Fatty acids found in fish oil are also known to have anti-inflammatory effects and have been linked to a reduced risk of allergies in children, they said.
The authors noted that feeding children a Mediterranean diet was associated with a reduced risk of wheezing and allergy, although the findings were not statistically significant in this study.
They added, "Our results support a protective effect of a high level of adherence to a Mediterranean diet during pregnancy against asthma-like symptoms and atopy in childhood."
Leanne Male, assistant director of Research at Asthma UK, said, "This study adds to previous research which shows that a Mediterranean diet, which traditionally contains higher levels of fresh fruit and vegetables, can have a beneficial effect on asthma symptoms and specifically in this study that these benefits can be passed on to the pregnant mother's unborn child.
"This supports our advice to pregnant mothers to eat a healthy, balanced diet and is of particular significance to mothers in the U.K. as we have one of the highest rates of childhood asthma worldwide, with one in 10 children suffering from the condition."
From the January 21, 2008, Prepared Foods e-Flash