It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Prophet Muhammad (peace and blessings be upon him) said: Yawning in prayer is from Satan, so if any one of you feels the urge to yawn, he should try to restrain it as much as possible.
Hadith Referenceصحيح ابن خزيمه / جماع أبواب الأفعال المكروهة فى الصلاة التى قد نهي عنها المصلي / 920
Hadith Takhrijصحيح مسلم
Explanation & Benefits
Shaykh Muhammad Farooq Rafi
Benefits: These hadiths are evidence that it is permissible to suppress a yawn in the prayer, and placing the hand or a cloth etc. over the mouth to suppress it is a permissible and recommended act, and is not contrary to the prayer.
Source: Sahih Ibn Khuzaymah: Commentary by Muhammad Farooq Rafee, Page: 920