Scientists, who published their work in the "Gut" journal, say taking drugs may alter gut bacteria, making a child more susceptible to putting on weight.
The study examined antibiotic and antacid prescriptions for 333,353 children in their first two years and followed their medical records up to the age of eight.
Being prescribed antibiotics during early childhood increases obesity risk by 26 per cent, irrespective of the type of antibiotic.
Young children who are prescribed antibiotics and antacids to tackle excess stomach acid might have a greater risk of obesity.More news: Stranger Things cast get together for Halloween
Boys, those born after a caesarean section, and those whose parents were below officer rank were more likely to become obese.
The findings further revealed that antibiotics or acid suppressants was associated with a heightened risk of obesity by the age of 3 - the average age at which obesity was first identified in these children.
Speaking about it, Dr Cade Nylund from the University of the Health Sciences in Maryland, senior author of the study said that there are too many unnecessary antibiotics being prescribed to infants who may not need them, for things like common colds. Antacid drugs also affected the microbiome's make-up and were linked to a heightened risk of obesity.
In all, 72.5 per cent had been prescribed an antibiotic; just under 12 per cent an H2RA; and just over three per cent a PPI during that period. a total of 5,868 children were prescribed all three types of drug.More news: Sterling agrees new '£300000 a week' City contract
Dr Max Davie of the Royal College of Paediatrics and Child Health said the USA research did not take into account other causes of child obesity such as their home environment or mother's weight.
Early exposure to antibiotics and antacids could increase the likelihood of developing obesity.
They add: "There is an important therapeutic role for microbiota-altering medications. The long term risks to health must be weighed against the short-term benefits".
But the researchers also pointed out that over prescription of both antibiotics and acid suppressants, including in young children, is "a significant problem".More news: Kelly's Lawyer Accuses NBC Of Leaking Dirt During Departure Negotiations