Yes, if there are no underlying issues after your miscarriage, then you can definitely prevent weight gain by going back to your pre-pregnancy diet, and adopting a healthy lifestyle. Also, exercise 5 days a week for at least 3o minutes and drink plenty of water.