H 148 "If any of you feels sleepy in the course of the prayer, you should sleep until your sleepiness departs. If you pray while you are sleepy you cannot be certain that while meaning to seek forgiveness that you have (accidentally) cursed yourself instead." R 148 Bukhari and Muslim with a chain up to the Mother of Believers, Lady Ayesha who related that the Messenger of Allah, praise and peace be upon him, said this.
147- وعن عائشة رضي الله عنها : أنَّ رَسُول الله صلى الله عليه وآله وسلم ، قَالَ : "إِذَا نَعَسَ أَحَدُكُمْ وَهُوَ يُصَلِّي فَلْيَرْقُدْ حَتَّى يَذْهَبَ عَنْهُ النَّومُ ، فإِنَّ أحدكم إِذَا صَلَّى وَهُوَ نَاعِسٌ لا يَدْرِي لَعَلَّهُ يَذْهَبُ يَسْتَغْفِرُ فَيَسُبُّ نَفْسَهُ" مُتَّفَقٌ عَلَيهِ .