It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) saw a rope hanging between two pillars and asked, "What is this rope?" The people said, "This rope has been hung by such-and-such woman for prayer; when she becomes tired while standing, she holds on to it for support." The Prophet (peace and blessings be upon him) said, "Do not do this. Pray as long as you are alert and conscious; when drowsiness overcomes you, then go and sleep."
Hadith Referenceالسنن المأثورة / ما جاء في الجمع بين الصلاتين في المطر / 32
Hadith Takhrijصحیح بخاری، التهجد، باب ما يكره من التشديد في العبادة، رقم: 1150، صحیح مسلم، المساجد ومواضع الصلاة باب امر من نعس في صلاته الخ، رقم: 784