Scientists analysed data on more than 8000 American children, including 140 who had peanut or tree nut (P/TN) allergies.
Those with non-allergic mothers who ate nuts five times a week or more turned out to have the lowest P/TN allergy risk.
The findings show mothers-to-be may have been wrongly advised in the past to avoid nuts.
"Our study showed increased peanut consumption by pregnant mothers who weren't nut allergic was associated with lower risk of peanut allergy in their offspring," said US lead researcher Dr Michael Young, from Boston Children's Hospital.
At the end of the 1990s it was widely assumed consuming nuts risked sensitising children. For years mothers in the US were advised to avoid all nuts while pregnant and breast feeding and to keep their children away from peanuts until they were three years of age. But because of lack of evidence, the guidance was rescinded in 2008.
In the US, the prevalence of childhood peanut allergy has more than tripled from 0.4% in 1997 to 1.4% in 2010.
"No one can say for sure if the avoidance recommendation for peanuts was related to the rising number of peanut allergies seen in the late 1990s and early 2000s, but one thing is certain: it did not stop the increase," Dr Young added. "It was clear that a new approach was needed, opening the door for new research."
He stressed that the findings, published in the journal JAMA Pediatrics, only showed an association, not a cause-and-effect relationship.