Messenger of Allah said: "When one of you is sleepy and he is performing Salat, then let him lie down until the sleep is gone from him. For when one of you performs Salat while he is sleepy, perhaps he wants to seek forgiveness but he curses himself."
قَالَ رَسُولُ اللَّهِ ﷺ إِذَا نَعَسَ أَحَدُكُمْ وَهُوَ يُصَلِّي فَلْيَرْقُدْ حَتَّى يَذْهَبَ عَنْهُ النَّوْمُ فَإِنَّ أَحَدَكُمْ إِذَا صَلَّى وَهُوَ يَنْعَسُ لَعَلَّهُ يَذْهَبُ يَسْتَغْفِرُ فَيَسُبَّ نَفْسَهُ قَالَ وَفِي الْبَابِ عَنْ أَنَسٍ وَأَبِي هُرَيْرَةَ