To sustain a pregnancy after miscarriage, one should avoid smoking & alcohol, limit caffeine intake, maintain proper folate levels in the body, and improve the body mass index. Miscarriage, or spontaneous abortion, is defined as a clinically recognized pregnancy loss before the 20th week of gestation. Between 8% and 20% of pregnancies end in a spontaneous abortion and therewith is the most common complication of pregnancy in the United States.
Future Pregnancy Prognosis
Studies showed that between 67% and 75% of women had a successful second pregnancy after one or more miscarriages. An increasing maternal age and a higher number of miscarriages were associated with a significant decrease in the probability of having a live birth. Second-trimester pregnancy loss is associated with recurrent second-trimester miscarriage and spontaneous preterm birth in the future. 
Can Fertility be Improved after Miscarriage?
Most miscarriages are not preventable since about 50% of the cases occur due to chromosomal abnormalities. However, there are many risk factors associated with a miscarriage. Advancing maternal age is the most important risk factor in healthy women. Other unadaptable risk factors are a previous spontaneous abortion, prolonged ovulation to implantation interval, prolonged time to conception, fever, and maternal disease (i.e. polycystic ovary syndrome and Toxoplasma gondii). On the other hand, there actually are some modifiable risk factors, and by changing these habits and activities a woman can help improve her reproductive health and thereby support pregnancy after miscarriage: 
Ways to Support Pregnancy Post Miscarriage
Some of the ways that help sustain a healthy pregnancy include maintaining healthy BMI, folate levels and avoiding caffeine and alcohol.
Smoking 10 or more cigarettes per day is associated with an increased risk of miscarriage. This increased risk also accounts for paternal smoking. The mechanism is unknown but probably relate to the vasoconstrictive and antimetabolic effects of tobacco use. To lower the risk of a failed pregnancy after miscarriage or a miscarriage itself, smoking cessation is highly recommended.
Stop drinking alcohol
Moderate to high alcohol consumption increases the risk of spontaneous abortion, especially during the first 12 weeks of pregnancy. To lower the risk of miscarriage, alcohol should be abandoned from the diet before and during pregnancy.
Don’t take cocaine
Cocaine is a risk factor for both preterm birth as for miscarriage.
Maintain folate levels
Low plasma folate levels only increase the risk of miscarriage when the fetal karyotype is abnormal. Only 5% of the women receive folate supplementation and there is no evidence that vitamin supplementation prevents spontaneous abortion. However, folate supplementation is recommended for women who want to conceive for prevention of neural tube defects.
Limit caffeine intake
Normal caffeine intake does not increase the risk of miscarriage, but an intake of elevated levels of caffeine (more than 1000 mg. in 8 to 10 hours) does. To minimize the risk, it is recommended to limit the caffeine consumption to 200 to 300 mg. per day in women who are attempting to conceive, already pregnant, or breastfeeding
An alternative to nonsteroidal anti-inflammatory drugs
The use of NSAID’s around the time of conception may increase the risk of miscarriage. Prostaglandin inhibitors interfere with the role prostaglandins play in implantation, that can lead to abnormal implantation and thus pregnancy failure. Women trying to conceive should avoid NSAID’s to minimize the risk of spontaneous abortion and try if there are effective alternatives. 
An increased risk of miscarriage seems to be related to increasing gravidity.
A Body Mass Index (BMI) less than 18.5 or more than 25, both underweight and overweight, before pregnancy, has been associated with a higher risk of infertility and miscarriage. To preserve a good reproductive health, it is recommended to maintain a normal BMI.
Things to Remember
If you and your partner are planning to have a baby, it is recommended to make healthy lifestyle choices before conception and during pregnancy, as described above. This is not only important for you, but also for your baby.
Women who just had a miscarriage are advised to maintain pelvic rest for two weeks, at which time coitus and use of tampons may be resumed.
After the abortion, light vaginal bleeding can persist for a couple of weeks. Call a medical doctor if heavy bleeding, fever, or abdominal pains develop.
There is no evidence that routine actions such as stress, lifting a heavy object, using an intrauterine device or prior oral conceptive usage cause miscarriage.
A miscarriage can be unexpected and emotionally devastating and women may suffer from psychological morbidity for months after the loss. Therefore, some patients may benefit from (grief) counseling. 
After a miscarriage, when you and your partner are emotionally ready, you don’t have to wait for three months to try again to get pregnant.
Maybe you don’t want to try to conceive again immediately after the spontaneous abortion, in this case, it may be useful to start contraceptive. The optimal contraceptive start time after miscarriage is, however, unclear, because the amount of time required for uterine evacuation is unpredictable. The pregnancy may have lost viability days or weeks prior to the passage of tissue. Furthermore, the start time for contraception is different for each the contraceptive method.