Prolonged Crying does not Invalidate the Prayer
Question :
In Maghrib prayer, in the third Rak'ah, I thought of the punishment in the grave, its terror, torment and hardship, and my tears flowed and I began to cry for almost five minutes. After that, I completed the prayer. Was my prayer permissible, or should I repeat it?
Answer:
It is from the guidance of the Messenger that when he recited in prayer, if he came to a Verse mentioning Allah's Mercy, he would ask (for it) and if he came to a Verse mentioning punishment, he would seek refuge from it. And Allah praises those who cry in prayer, saying:
Verily, those who were given knowledge before it, when it is recited to them, fall down on their faces in humble prostration.
And after mentioning a group from among the Messengers, Allah says:
And from among those whom We guided and chose. When the Verse of the Most Gracious (Allah) were recited unto them, they fell down prostrate and weeping.
It is clear from this that crying during prayer - if due to fear of Allah does not invalidate it.
Source:
The Permanent Committee
Fatawa Islamiyah, Vol. 2 Pages 150-151