Amounts of fibre, calories, omega 3 consumed - and other aspects of their pregnancy diets- made no difference, the study found.
The researchers achieved comparable results in a lab test on fruit flies - the more fruit they ate before laying eggs, the better the offspring did in specially adapted tests.
As the results were similar, the experts say other factors such as social class, education or whether the babies were breastfed, for instance could be ruled out. The tests suggest that the "cyclic adenylate monophosphate pathway" - responsible for "higher order thinking" in flies and humans - is boosted by fruit eaten during gestation in both women and female flies.
This pathway also regulates the body's proteins and chemicals, how cells bind together and the function of areas of the brain including the prefrontal cortex.
The university report for the specialist online journal EBioMedicine noted: "Mothers who ate more fruit during pregnancy had children who did better on developmental testing at 1 year of age. Similarly, fruit flies had improved learning and memory if their parents had more fruit juice in their diet.
"In both humans and in the flies, there was no improvement in learning when only the babies were fed fruit. The cyclic adenylate monophosphate pathway may be a major regulator of this effect."
The memories of fruit flies were tested by exposing them to two different successive smells "repulsive" to the insects. One of the odours was paired to an electrical shock, while the other was benign.
They were then presented with two tubes - via which they can fly to either the first or second odour. Flies with better memories learn to avoid the smell that leads to a shock. This memory lasts for about a week - or one fifth of an average fruit fly's lifetime.
Women are also recommended to eat fish and foods high in vitamin D during pregnancy.
A study from the Icahn School of Medicine at Mount Sinai in New York found that eating foods rich in the vitamin reduces the risk of asthma by 20 per cent.
Vitamin D is commonly known as the "sunshine vitamin" - as humans are exposed to high levels of it from the sun's rays.