A new study found exercise is not just good for moms, but could also have lasting benefits for babies, too.