That is OK. Your body is doing Spring cleaning and decided to deeply clean your uterine walls. You are to be thankful for that. It looks you had not been menstruating all you needed to or in the way you needed to dispose of properly of that monthly uterine lining that we all need to expel out every month.
I am a female who has menstruated during fasting periods, just like you.
If you read enough about fasting you will also find out that on many occasions, menstruation arrives earlier .... It is the body, again, eager to clean itself out....