بسم الله الرحمن الرحيم
On the authority of Abu Saeed (Sa’d ibn Malik ibn Sinan) Al Khudri, the Prophet -sallahu alayhi wa sallam- said, “Whenever one of you yawns, then place his hands on his mouth as the devil enters through it.”
Ibn Abbas narrated the statement of Allah’s Messenger -sallahu alayhi wa sallam: “Whenever one yawns then place his hand over his mouth, indeed it (yawning) is only from the devil.”
Both narrations are collected by Imaam Al Bukhari in his book entitled “Al-Adab Al-Mufrad” and both are graded as authentic.
Sheikh Zayd Al Madkhali said, “This narration indicates the dislike of yawning and the obligation of suppression, and it is to repel yawning, to place the hand over the mouth, and to prevent raising the voice during yawning. The ruling brought forth in these narrations is coupled with its reason. The ruling is the obligation of suppression during yawning, thus whoever yawns should place his hand over his mouth so that it does not open as the devil enters through it. It is as the Prophet -sallahu alayhi wa sallam- said about him, ‘He flows through the son of Adam by way of the blood vessels.’
Therefore it is compulsory on the Muslim to put his hand over his mouth, and it is not permissible to utter anything. No remembrance, no speech, no screech, on the contrary he suppresses so that he does not ever say anything, in order to safeguard himself from the affliction of the devil.”
Translated by Najeeb ibn Yusuf Al Anjelesi
Source: عون الأحد الصمد شرح الأدب المفرد