Anas bin Malik reported,

The Messenger of Allah ﷺ entered the mosque and saw a rope stretched between two pillars.He asked, "What is this?"They replied, "It belongs to Zaynab. She prays holding onto it, and when she grows tired or weary, she leans on it for support."He said, "Untie it. Let one of you pray as long as he has energy, and when he grows tired or weary, let him sit down."In the version reported by Zuhayr, the wording is, "let him sit down."

Muslim 1831

Sahih

و حدثنا أبو بكر بن أبي شيبة حدثنا ابن علية ح و حدثني زهير بن حرب حدثنا إسمعيل عن عبد العزيز بن صهيب

عن أنس قال

دخل رسول الله ﷺ المسجد وحبل ممدود بين ساريتين فقال ما هذا قالوا لزينب تصلي فإذا كسلت أو فترت أمسكت به فقال حلوه ليصل أحدكم نشاطه فإذا كسل أو فتر قعد وفي حديث زهير فليقعد

مسلم 1831صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Travelers' prayer and its shortening
Chapter
Command for one who becomes drowsy in his prayer or finds the Quran or remembrance difficult to lie down or sit until that leaves him
Numbering
Darussalam 1831
Muslim 1831