Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
You shouldn’t be fasting in this condition since you are considered to be in a state of nifas, or postnatal bleeding. However, you ought to resume praying and fasting soon as you are able to determine that the bleeding related to childbirth has stopped, and after you perform ghusl (a complete ritual bath).
Responding to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
First of all, let me pray to Allah to bless your child and make him or her grow in faith and purity. May he or she also be a source of true joy for you and your family and an asset for the community. Amen.
You shouldn’t be fasting in this condition since you are considered to be in a state of nifas, or postnatal bleeding. However, you ought to resume praying and fasting soon as you are able to determine that the bleeding related to childbirth has stopped, and after you perform ghusl (a complete ritual bath).
There is a difference of opinion among scholars with regard to the exact duration of nifas (bleeding associated with childbirth). Some say it is a maximum of forty or sixty days, while some others say it is “as long as the bleeding continues.”
The diversity of opinion is due to the fact that there is no categorical text on it, and in the absence of such a text, they rely on the precedents or opinions of scholars who based their rulings on the statements of Companions or on their own personal research. While many scholars considered forty days to be the cut-off point, Imam Al-Shafi`i set it at sixty based on his personal research into the conditions of women at his time.
Imam Al-Shafi`I’s criteria has value. If we were to apply this approach to our state of scientific knowledge in such areas today, we should leave the issue to experts in this field. So, if your gynecologist confirms your bleeding as being due to childbirth, then you must stay away from prayer and fasting. If, however, she says it is due to a chronic condition, then you should resume praying and fasting after the expiry of forty days.
In this case, the rules of istihadah (irregular bleeding) apply. In the case of istihadah, a woman should only wash herself and perform wudu prior to the prayer she intends to perform and does not have to take a ritual bath.
The fact that you are exempt from fasting while in a state of nifas, however, should not be a reason for you not to make use of the other opportunities provided by the blessed month by performing extra acts of virtue (called nawafil), such as constancy in Dhikr (remembrance of Allah), reading the Quran, and engaging in charitable works as best as you can whilst staying away from frivolities and focusing your mind on the thought of Allah.
Almighty Allah knows best.