Sayyiduna Anas bin Malik (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) entered the mosque and saw a rope tied between two pillars. He (peace and blessings be upon him) asked: "Whose rope is this?" The people said: "It belongs to so-and-so (a woman); she prays with it, and when sleep overcomes her, she hangs on to it." He (peace and blessings be upon him) said: "Let her pray as long as she is alert, and when she fears that sleep will overcome her, let her sleep."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4746