عَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا قَالَتْ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((إِذَا نَعَسَ أَحَدُكُمْ فِي الصَّلَاةِ فَلْيَرْقُدْ حَتَّى يَذْهَبَ عَنْهُ النَّوْمُ، فَإِنَّهُ إِذَا صَلَّى وَهُوَ يَنْعَسُ لَعَلَّهُ يَذْهَبُ يَسْتَغْفِرُ فَيَسُبُّ نَفْسَهُ))
Sayyidah Aisha (may Allah be pleased with her) narrates that the Messenger of Allah (peace and blessings be upon him) said: When any one of you becomes drowsy during prayer, he should sleep until the effect of sleep has gone away, because if he prays while in that drowsy state, it is possible that he may (think he is) seeking forgiveness, while in fact he is cursing himself.