ENOfficial
It was narrated from Anas that the Messenger of Allah (ﷺ) said: "If anyone of you feels drowsy during his Salah, let him go and take a nap."
Source: sunnah.com
Other translations
Arabic
أَخْبَرَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ، قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ الرَّحْمَنِ الطُّفَاوِيُّ، قَالَ حَدَّثَنَا أَيُّوبُ، عَنْ أَبِي قِلاَبَةَ، عَنْ أَنَسٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِذَا نَعَسَ أَحَدُكُمْ فِي صَلاَتِهِ فَلْيَنْصَرِفْ وَلْيَرْقُدْ " .
sunnah.com