Sunan Abi Dawud Book 2, Hadith 324
I used to sleep lying between the Messenger of Allah (ﷺ) and the qiblah. The Messenger of Allah (ﷺ) used to pray when I (was lying) in front of him. When he wanted to offer the witr prayer - added by the narrator Uthman - he pinched me - then the narrators are agreed - and said: Set aside.
"I used to be asleep while my legs would be in the front of the Messenger of Allah (ﷺ) while he was praying during the night. When he wanted to prostrate, he would prod my feet, so I would pull them up, and he would prostrate.
I came riding a donkey. Another version has: Ibn Abbas said: When I was near the age of the puberty I came riding a she-ass and found the Messenger of Allah (ﷺ) leading the people in prayer at Mina. I passed in front of a part of the row (of worshippers), and dismounting left my she-ass for grazing in the pasture, and I joined the row, and no one objected to that.
Abu Dawud said: These are the words of al-Qa'nabi, and are complete. Malik said: I take it as permissible at the time when the iqamah for prayer is pronounced.