‘Aishah (May Allah be pleased with Her) reported: The Prophet (PBUH) 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 prayer while feeling sleepy, he does not know whether he seeks forgiveness or abuses himself.”
[Al-Bukhari & Muslim]