Old health advice often dies hard. This is particularly true — perhaps dangerously so — of historic advice for pregnant women, according to a new Viewpoint published Tuesday in the Journal of the American Medical Association.

Most adults remember the traditional guidelines for expectant mothers. Get as much rest as possible during your pregnancy, even prolonged bed rest if complications arise. At the same time, “eat for two” — you and your developing child. According to the new report, however, “these misguided recommendations” have “evolved into a major contributor to the worldwide obesity epidemic.”

Fifty years ago, gynecological medicine emphasized the need for women to gain enough weight to provide for healthy fetal growth. Now the coin has been flipped.

About 45 percent of current mothers-to-be begin their pregnancy in an overweight or obese state, vs. 24 percent in 1983. In addition, nearly half of pregnant women now gain more weight in nine months than the amounts recommended by the Institute of Medicine. Those guidelines are ordered by body mass index of the woman — normal, overweight or obese — and stand at 25 to 35 pounds, 15 to 25 pounds, and 11 to 20 pounds.

[Listen up, dads: Obesity makes your sperm weird.]

What happens when both mothers and newborns weigh significantly more than they did just several decades ago? The question occupies one of the most active areas of obesity research.

Many experts believe that obesity fuels obesity through the generations. An overweight mother is likely to have overweight daughters, who then give birth to overweight children of their own. The tendency to weigh too much and move too little can be passed along both through genes and through lifestyle and environment.

The JAMA Viewpoint looks at four key aspects of exercise during pregnancy: safety, benefits, the when and how, and precautions. A recent meta-analysis of studies with more than 2,500 pregnant women found no risk of preterm birth or low birth-weight children among normal-weight women who exercised. Moderate exercise is now recommended even for women who did not exercise before becoming pregnant. Indeed, pregnancy is considered an excellent time to introduce healthy lifestyle habits because the mother is highly motivated.

The list of exercise-during-pregnancy benefits is lengthy, and includes: less macrosomia (birth of children weighing more than 8 pounds, 13 ounces), less gestational diabetes, less preeclampsia, fewer Caesarean-section deliveries, less low-back pain, less pelvic girdle pain, and lower frequency of urinary incontinence. Lower rates of macrosomia are also linked to lower child and adolescent obesity, which can contribute to weight problems in adulthood.

High-quality studies indicate that it is safe for pregnant women to do moderate aerobics and strength training from the time of the first prenatal visit (about weeks 9-12) until just before delivery. The exercise recommendation is the same as for nonpregnant women: 20 to 30 minutes per day on most days of the week. To gauge intensity, women can use the “talk test.” If you can carry on a conversation while exercising, you are not overexerting yourself.

Some exercises should be avoided. These include long-distance running, which could raise body temperature and/or cause dehydration; exercising at greater than 90 percent of maximum heart rate; lifting heavy weights (or performing isometrics); or getting in a supine position during the last two trimesters. Also, despite the current popularity of yoga and Pilates, they have not been shown to have physiological benefits for pregnant women. (They may nonetheless be good for stress and pain reduction.)

“Pregnancy is no longer considered a state of confinement,” note the Viewpoint authors, a trio of Spanish exercise and health experts. “An active lifestyle during pregnancy is safe and beneficial.”

American experts agree. Just last week, Lisa Bodnar, University of Pittsburgh associate professor of obstetrics, gynecology and reproductive sciences, published a new report in the Journal of the Academy of Nutrition and Dietetics that investigated the diets of 7,500 pregnant women. The study revealed alarmingly high percentages of added sugars and solid fats in the women’s diets.

“Many women gain too much weight during pregnancy, and this has become a major public health concern,” Bodnar says. “Excessive weight gain during pregnancy increases women’s risks of retaining that weight postpartum, and also of having a child who becomes obese.”

In 2013, obesity researcher and theorist Edward Archer published a paper on what he calls the “Maternal Resources” hypothesis. It described how an environment rich in cheap food sources but lacking in physical activities for the mother, in part from the increase in labor-saving household devices (washing machine, dish washer, vacuum cleaner, etc.), conspires to produce overweight mothers and children.

[The real reason that people are obese]

“Maternal inactivity is the greatest global health issue in the 21st century because it affects both current and future generations,” says Archer, now chief science officer at Enduring FX, a biotech start-up. “Adequate physical activity during pregnancy regulates both appetite and energy expenditure, thereby improving birth outcomes for both mother and child.” He also says that the optimal time to improve maternal fitness is before pregnancy.

The JAMA report largely reflects the findings of a December 2015 “Committee Opinion” from the American College of Obstetricians and Gynecologists. That Opinion stated that “regular physical activity during pregnancy improves or maintains physical fitness, helps with weight management, reduces the risk of gestational diabetes in obese women, and enhances psychologic well-being.” It added that “there is no credible evidence to prescribe bed rest in pregnancy,” and observed that women can continue exercising after childbirth to improve their own cardiovascular fitness.