We were with the Messenger of Allah ﷺ on a journey, and he said, "If you do not reach water tomorrow, you will go thirsty."The swiftest of the people hurried on ahead, wanting to reach the water, but I stayed close to the Messenger of Allah ﷺ. His mount began to lean to one side, for the Messenger of Allah ﷺ had grown drowsy, so I propped him up and he steadied himself. Then he leaned again until he nearly slipped from his mount, so I propped him up once more and he woke.He asked, "Who is this man?"I said, "Abu Qatada."He asked, "How long have you been travelling like this?"I said, "Since the beginning of the night."He said, "May Allah guard you as you have guarded His Messenger." Then he said, "Shall we stop and rest?"He turned aside to a tree and dismounted, then said, "Look and see whether you can see anyone."I said, "Here is a rider. Here are two riders." I kept counting until they numbered seven.He said, "Keep watch over our prayer for us."We slept, and nothing woke us but the heat of the sun. When we woke, the Messenger of Allah ﷺ mounted and rode on, and we rode with him a short while. Then he dismounted and asked, "Do you have any water?"I said, "Yes, I have a small water skin with a little water in it."He said, "Bring it."I brought it to him, and he said, "Take a little from it, take a little from it." So the people performed wudu, and one gulp was left.He said, "Take good care of it, Abu Qatada, for it will have a story to tell."Then Bilal called the adhan, and they prayed the two rakahs before Fajr, then they prayed Fajr. Then he mounted and we mounted, and the people said to one another, "We have been negligent with our prayer."The Messenger of Allah ﷺ said, "What are you saying? If it concerns the affairs of your worldly life, that is your own business, but if it concerns the affairs of your religion, then it is for me to decide."We said, "Messenger of Allah, we have been negligent with our prayer."He said, "There is no negligence in sleep. Negligence is only while awake. So when that happens, pray the prayer then, and on the following day at its proper time." Then he said, "What do you suppose the people are thinking?"They said, "You told them yesterday that if they did not reach water tomorrow they would go thirsty, so the people have gone on to the water."He said, "The people woke this morning and found that they had lost their Prophet. Some of them said to one another, 'The Messenger of Allah ﷺ is at the water.' But among them were Abu Bakr and Umar, and the two of them said, 'People, the Messenger of Allah ﷺ would not go ahead of you to the water and leave you behind.' If the people obey Abu Bakr and Umar, they will be rightly guided." He said this three times.When the midday heat grew fierce, the Messenger of Allah ﷺ came into their view, and they said, "Messenger of Allah, we are dying of thirst, our throats are parched."He said, "No harm will come to you." Then he said, "Abu Qatada, bring the water skin."I brought it to him, and he said, "Untie my cup for me," meaning his drinking cup. So I untied it and brought it to him, and he began pouring into it and giving the people to drink. The people crowded around him, and the Messenger of Allah ﷺ said, "People, be orderly in drawing your share, for every one of you will drink his fill."So the people drank until no one remained but myself and the Messenger of Allah ﷺ. He poured for me and said, "Drink, Abu Qatada."I said, "You drink first, Messenger of Allah."He said, "The one who serves the people drinks last."So I drank, and he drank after me, and there remained in the water skin about as much as had been in it before. They numbered three hundred that day.Abdullah said, Imran bin Husayn heard me while I was narrating this hadith in the great masjid, and he asked, "Who is this man?"I said, "I am Abdullah bin Rabah Ansari."He said, "The people know their own hadith best. Be careful how you narrate it, for I was one of the seven that night." When I finished, he said, "I never imagined that anyone but me had preserved this hadith."And he added, When the Messenger of Allah ﷺ halted to rest during the night, he would lie on his right side, and when he halted to rest near dawn, he would place his head on his right palm and prop up his forearm.
قال حماد وحدثنا حميد الطويل عن بكر بن عبد الله المزني عن عبد الله بن رباح عن أبي قتادة عن النبي ﷺ بمثله وزاد قال كان رسول الله ﷺ إذا عرس وعليه ليل توسد يمينه وإذا عرس الصبح وضع رأسه على كفه اليمنى وأقام ساعده
Its isnad is sahih. Abdullah bin Rabah is the Ansari, Abu Khalid, of Madinah, one of the reliable and excellent Followers, and his hadith is found in Muslim. This hadith has come up many times before. See 22379 and its references.