Abu Dawud Book 1, Hadith Number 287.
Chapter : A person who is sexually defiled is permitted to eat anything before washing.
Narated By Hamnah daughter of Jahsh : Hamnah said my menstruation was great in quantity and severe. So I came to the Apostle of Allah (PBUH) for a decision and told him. I found him in the house of my sister, Zaynab, daughter of Jahsh.
I said: Apostle of Allah, I am a woman who menstruates in great quantity and it is severe, so what do you think about it? It has prevented me from praying and fasting.
He said: I suggest that you should use cotton, for it absorbs the blood. She replied: It is too copious for that. He said: Then take a cloth. She replied: It is too copious for that, for my blood keeps flowing. The Apostle of Allah (PBUH) said: I shall give you two commands; whichever of them you follow, that will be sufficient for you without the other, but you know best whether you are strong enough to follow both of them.
He added: This is a stroke of the Devil, so observe your menses for six or seven days, Allah alone knows which it should be; then wash. And when you see that you are purified and quite clean, pray during twenty-three or twenty-four days and nights and fast, for that will be enough for you, and do so every month, just as women menstruate and are purified at the time of their menstruation and their purification.
But if you are strong enough to delay the noon (Zuhr) prayer and advance the afternoon (‘Asr) prayer, to wash, and then combine the noon and the afternoon prayer; to delay the sunset prayer and advance the night prayer, to wash, and then combine the two prayers, do so: and to wash at dawn, do so: and fast if you are able to do so if possible;
The Apostle of Allah (PBUH) said: Of the two commands this is more to my liking.