It may seem logical that if you crave certain foods during pregnancy, that craving is just your body's way of telling you what it needs. But giving in to cravings may do more harm than good, a recent study finds.

The more often women in the study gave in to such cravings, the more likely they were to gain too much weight during their pregnancy, according to the study, published May 20 in the journal Appetite.

Previous research has shown that the more weight you gain during pregnancy, the harder it is to lose that weight after giving birth. And experts agree that gaining too much weight during pregnancy is the biggest contributor to postpartum weight retention. But studies have found that between 40 to 60 percent of women gain too much during this time.

"An estimated 50 to 90 percent of women in the U.S. experience food cravings at some point during pregnancy," the researchers, led by Natalia Orloff, a graduate student in clinical psychology at the University of Albany in New York, wrote in the study. [The Science of Hunger: How to Control It and Fight Cravings]

In the study, the researchers wanted to see if there was a link between having these cravings during pregnancy and weight gain.

The researchers asked two groups of pregnant women — 43 who were recruited online, and 40 who were recruited in a hospital — to complete surveys about their food cravings. The average age of the women in both groups was similar (31 for the online group and 30 for the hospital).

The surveys included questions about how often the women craved foods from four different categories (sweets, carbohydrates and starches, fast food and high-fat food), as well as how often they gave in to these cravings. The women were allowed to fill out the survey once per trimester.

The researchers calculated each woman's body mass index (BMI) using their height and pre-pregnancy weight. Based on each woman's BMI, the researchers then determined the appropriate amount of weight for her to gain during pregnancy.

Cravings for sweets and fast foods were the most common, and the women also reported giving in to these cravings the most frequently, the researchers found. The most commonly craved foods were chocolate, pizza, cookies and ice cream.

Editor's Recommendations

And the more often women reported craving a food, the more likely they were to give in to the craving, according to the study.

When it came to weight gain, the researchers found that the more often women experienced cravings, the more likely they were to gain excess weight.

Interestingly, however, the frequency of giving in to the cravings was only associated with weight gain among the women in the online group, not the women in the hospital group. This finding was "noteworthy and merits an attempt at explanation," the researchers wrote. One possible explanation may be that the women in the hospital group started out, on average, at a higher weight than the women in the online group, although more research is needed to look at this, they wrote.

They noted that groups were slightly different in their composition. For example, the women in the hospital group were more likely to be obese at the start of the study than those recruited online, and 93 percent of the women in the online group were white, compared with 60 percent of women in the hospital group.

But in any case, the findings suggest that weight management during pregnancy should incorporate skills that help women decrease the frequency of their food cravings, as well as offer strategies women can use to avoid giving in to them, the researchers wrote. 

While it can be difficult to control when a craving pops up, studies have shown that strategies that distract a person from a food craving, such as thinking about engaging in a favorite activity or playing a game of Tetris, may help people avoid giving in to the craving.

Copyright 2016 LiveScience, a Purch company. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.