When one of you dozes in prayer he should sleep till his sleep is gone, for when one of you prays while he is dozing, perhaps he might curse himself if he begs pardon of Allah. (Using translation from Abū Dāʾūd 1310)
"إذَا نَعَسَ أحدُكُمْ في الصلاةِ فليرقد حتَّى يذهب عنه النومُ, فإِنَّ أحدَكُمْ إذَا صلَّى وهو ناعِسٌ لا يدْرى لعلَّه يذهبُ يستغفِرُ فيسُبُّ نفسَهُ".