Those whose mothers had been prescribed medicines to treat acid reflux during pregnancy were more likely to be treated for asthma in childhood, a review of studies found.
However, experts say the potential link - which came to light by reviewing studies that had examined health records - is not conclusive.
They say that the association could be caused by a separate, linked factor and that further research is needed to determine whether the medicines affect the health of children.
Mothers-to-be should follow existing guidelines - to use the medicines as required - and consult with a doctor or nurse if symptoms persist, they recommend.
Heartburn is caused by stomach acid passing from the stomach back into the oesophagus - the tube that connects the stomach to the throat. The condition is very common in pregnancy because of hormonal changes and pressure on the stomach from the growing womb.
Drugs called H2-receptor antagonists and proton pump inhibitors can help to block this acid reflux. They are considered safe to use in pregnancy because they do not affect development of the baby.
Scientists had previously suggested that use of these medicines may increase the risk of allergies in the unborn baby through impacting on the immune system. Studies to investigate a link have been inconclusive.
Researchers led by the Universities of Edinburgh and Tampere in Finland reviewed eight previous studies involving more than 1.3 million children. The research had examined healthcare registries and prescription databases linking information about both mothers and children.
The team found that children born to mothers who had been prescribed acid-blocking drugs during pregnancy were at least one third more likely to have visited a doctor for symptoms of asthma.
Advice for expectant mums should not change based on these findings, the researchers say, but further studies are needed.
The study is published in the Journal of Allergy and Clinical Immunology.
Professor Aziz Sheikh, Co-director of the Asthma UK Centre for Applied Research at the University of Edinburgh, said: "Our study reports an association between the onset of asthma in children and their mothers' use of acid-suppressing medication during pregnancy. It is important to stress that this association does not prove that the medicines caused asthma in these children and further research is needed to better understand this link."
Dr Samantha Walker, Director of Policy and Research at Asthma UK, said: "It is important to stress that this research is at a very early stage and expectant mums should continue to take any medication they need under the guidance of their doctor or nurse.
"We don't yet know if the heartburn medication itself is contributing to the development of asthma in children, or if there is common factor we haven't discovered yet that causes both heartburn in pregnant women and asthma in their children. The study points us towards something that needs further investigation which is why we need to see more research carried out into the causes of asthma, a condition that affects 5.4 million people in the UK alone.
"Mums-to-be with any concerns can call the Asthma UK helpline on 0300 222 58000 to speak to a specialist asthma nurse."
Article: Acid-suppressive medications during pregnancy and risk of asthma and allergy in children: A systematic review and meta-analysis, Rebecca E. Devine, MPH, Nicola McCleary, PhD, Aziz Sheikh, MD, Bright I. Nwaru, PhD, Journal of Allergy and Clinical Immunology, doi: 10.1016/j.jaci.2016.09.046, published online 9 January 2017.