كتاب صلاة المسافرين وقصرها
6  
The Book of Prayer - Travellers
(31)
Chapter: The command to one who becomes sleepy while praying, or who starts to falter in his recitation of the Qur’an or statements of remembrance, to lie down or sit down until that goes away
(31)
باب أَمْرِ مَنْ نَعَسَ فِي صَلاَتِهِ أَوِ اسْتَعْجَمَ عَلَيْهِ الْقُرْآنُ أَوِ الذِّكْرُ بِأَنْ يَرْقُدَ أَوْ يَقْعُدَ حَتَّى يَذْهَبَ عَنْهُ ذَلِكَ
Sahih Muslim 785 a

'Urwa b. Zubair reported that 'A'isha, the wife of the Messenger of Allah (ﷺ), told him that (once) Haula' dint Tuwait b. Habib b. Asad b. 'Abd al-'Uzzi passed by her (at the time) when the Messenger of Allah (ﷺ) was with her. I ('A'Isha) said:

It Is Haula' bint Tuwait and they say that she does not sleep at night. Upon this the Messenger of Allah (ﷺ) said: (Oh) she does not sleep at night! Choose an act which you are capable of doing (continuously). By Allah, Allah would not grow weary, but you will grow weary.
وَحَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى، وَمُحَمَّدُ بْنُ سَلَمَةَ الْمُرَادِيُّ، قَالاَ حَدَّثَنَا ابْنُ وَهْبٍ، عَنْ يُونُسَ، عَنِ ابْنِ شِهَابٍ، قَالَ أَخْبَرَنِي عُرْوَةُ بْنُ الزُّبَيْرِ، أَنَّ عَائِشَةَ، زَوْجَ النَّبِيِّ صلى الله عليه وسلم أَخْبَرَتْهُ أَنَّ الْحَوْلاَءَ بِنْتَ تُوَيْتِ بْنِ حَبِيبِ بْنِ أَسَدِ بْنِ عَبْدِ الْعُزَّى مَرَّتْ بِهَا وَعِنْدَهَا رَسُولُ اللَّهِ صلى الله عليه وسلم فَقُلْتُ هَذِهِ الْحَوْلاَءُ بِنْتُ تُوَيْتٍ وَزَعَمُوا أَنَّهَا لاَ تَنَامُ اللَّيْلَ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ تَنَامُ اللَّيْلَ خُذُوا مِنَ الْعَمَلِ مَا تُطِيقُونَ فَوَاللَّهِ لاَ يَسْأَمُ اللَّهُ حَتَّى تَسْأَمُوا ‏"‏ ‏.‏
Reference : Sahih Muslim 785a
In-book reference : Book 6, Hadith 261
USC-MSA web (English) reference : Book 4, Hadith 1716
  (deprecated numbering scheme)