If there are sound reasons that may make a pregnant worries about miscarriage, and this is not just an illusion, like if there are signs which suggest that a miscarriage might happen, or that a trustworthy doctor informed her about this, then it is permissible for her to perform obligatory prayer while sitting and she is exempted from the obligation of standing in prayer due to the fear of harm.
Indeed, the jurists stated that if a person fears harm by praying while standing, then it becomes permissible for him to pray while sitting down.
Sharh Mukhtasar A-Khaleel authored by Al-Kharashi (may Allah have mercy upon him) reads: “Likewise, the praying person is exempted from standing if by standing he fears harm, like fainting, illness or its worsening, or the delay of recovering from it, as in tayammum (dry ablution); it is exactly the same, and this is whether the fear of what is mentioned above happens when standing in the prayer or before he even starts the prayer, by experience.”
Besides, the commentary of Ad-Dusuqi on Ash-Sharh Al-Kabir reads: “…Or that he has been informed about this by a person of the same temperament like him, or by a doctor who is well-versed in medicine, like if he says to him: if you pray while standing, you will faint or get dizzy for example, and he fears while performing the prayer or before starting the prayer that this might happen due to standing in prayer, …then he may sit down.” There is no doubt that fearing of miscarriage is included in fearing harm.
Finally, it should be mentioned that standing is an obligation only when performing an obligatory prayer. As regards the supererogatory prayer, then it is permissible for a person to pray while sitting down even if he does not have an excuse (for sitting down), but the reward of the supererogatory prayer performed while sitting down is less than its reward while standing, unless one has a legitimate excuse to sit down.