Anas reported that the Messenger of Allah (ﷺ) entered the mosque (and he found) a rope tied between the two pillars; so he said
What is this? They said: It is for Zainab. She prays and when she slackens or feels tired she holds it. Upon this he (the Holy Prophet) said: Untie it. Let one pray as long as one feels fresh but when one slackens or becomes tired one must stop it. (And in the hadith transmitted by Zuhair it is:" He should sit down." )
A hadith like this has been narrated from the Messenger of Allah (ﷺ) on the authority of Anas by another chain of transmitters.
'Urwa b. Zubair reported that 'A'isha, the wife of the Messenger of Allah (ﷺ), told him that (once) Haula' dint Tuwait b. Habib b. Asad b. 'Abd al-'Uzzi passed by her (at the time) when the Messenger of Allah (ﷺ) was with her. I ('A'Isha) said
It Is Haula' bint Tuwait and they say that she does not sleep at night. Upon this the Messenger of Allah (ﷺ) said: (Oh) she does not sleep at night! Choose an act which you are capable of doing (continuously). By Allah, Allah would not grow weary, but you will grow weary.
'A'isha said
The Messenger of Allah (ﷺ) came to me when a woman was sitting with me. He said: Who is she? I said: She is a woman who does not sleep but prays. He said: Do such acts which you are capable of doing. By Allah, Allah does not grow weary but you will grow weary. The religious act most pleasing to Him is one the doer of which does it continuously. (And in the hadith transmitted by Abu Usama [the words are]:" She was a woman from Banu Asad." )
'A'isha reported Allah's Apostle (ﷺ) as saying
When anyone amongst you dozes in prayer, he should sleep, till sleep is gone, for when one of you prays while dozing he does not know whether he may be asking pardon or vilifying himself.
Abu Huraira reported Allah's Messenger (ﷺ) as saying
When any one of you gets up at night (for prayer) and his tongue falters in (the recitation) of the Qar'an, and he does not know what he is reciting, he should go to sleep.