All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The scholars are not agreed on the maximum period that the woman spends after childbirth before she could pray and perform other related religious and matrimonial duties.
Some believe that it can reach sixty days. Others believe that it does not exceed forty days. The first opinion is the most prevailing one. Based on that, if the blood does not stop after sixty days, it is then considered Istihaadhah and not postpartum blood.
So, after this period the woman performs Ghusl (ritual bath) prays, fasts, and her husband can have sexual intercourse with her. She should perform ablution for every prayer as long as she notices any bleeding.
For more benefit on Istihaadhah and irregular menses, please refer to Fataawa 345745, 380429, 362518, 145201, 326818, and 156775.
For more benefit on irregular menses and signs of end of menses, please refer to Fataawa 395488, 361450, 355546, 323464, and 231715.
Allah knows best.