Researchers at the Harvard School of Public Health, Boston showed physical activity before pregnancy can lower gestational diabetes risk by up to half.
They also found exercise in early pregnancy cuts the risk by a quarter.
Promoting exercise among these groups could help prevent gestational diabetes and its complications, the authors said.
Researchers examined studies of 34,929 patients' activity levels prior to pregnancy and rates of gestational diabetes.
Women in the highest physical activity quartiles prior to pregnancy were 55 per cent less likely to develop gestational diabetes than those in the lowest. This benefit dropped to 24 per cent in those exercising in early pregnancy.
NICE recommends pregnant women undertake 30 minutes of moderate intensity exercise per day.
Deepa Khatri, clinical adviser at Diabetes UK, said: 'Women should try to achieve a healthy weight before conception, as active weight reduction during pregnancy is not appropriate.
'But it is important to encourage expectant mothers to avoid excess weight gain.'