Abu Sa’eed Al-Khudree (رضي الله عنه) reported that the Messenger of Allah (صلّى الله عليه وآله وسلّم) said,
إذا تثاءب أحدكم فليمسك بيده على فيه. فإن الشيطان يدخل
“When one of you yawns, then let him hold his hand over his mouth, for indeed, the Shaitaan [otherwise] enters.”
Ahmad related the Hadeeth thus: “When one of you yawns during prayer, then let him place his hands over his mouth, for verily, the Shaitaan enters with a yawn.”
[Related by Muslim(2995), Ahmad (10930), Abu Daawood (5026), and Ad-Daarimee (1382)]
Al-Nawawi (may Allaah have mercy on him) said:
Whether a person yawns during prayer or otherwise, it is mustahabb to place the hand over the mouth, and it is makrooh for a person to place his hand over his mouth when praying, unless there is a need to do so, such as yawning etc. end quote.
Al-Adhkaar, p. 346