'Aishah (May Allah be pleased with her) reported:
Messenger of Allah (ﷺ) said, "When one of you feels drowsy during prayer, let him lie down till drowsiness goes away from him, because when one of you performs prayers while feeling sleepy, he does not know whether he seeks forgiveness or abuses himself".[Al-Bukhari and Muslim].
Arabic/English book reference: Book 1, Hadith 147