one of you, he should suppress it as much as he can.”1
The instruction, “He should suppress it as much as he can,” means that he should try to prevent the yawn from occurring. If he cannot do so, he should try to close his mouth when it occurs. If he is unable to do that, he should cover his mouth with his hand or the edge of his garment.
It is unbecoming for a Muslim to yawn with his mouth agape without covering it with his hand or part of his garment. In addition to being unsightly, this provides Satan with a means and a way to enter. Muslim narrated in his Sahīh from Abū Saʿīd al-Khudrī, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: “When one of you yawns, he should cover his mouth with his hand, for Satan enters.”2 There is no established evidence for seeking refuge in Allah from Satan when yawning. However, if a Muslim remembers while yawning that it is from Satan and seeks refuge in Allah from him, there is no harm in doing so, provided that he does not adopt it as a sunnah.
As for sneezing, the sunnah has prescribed a number of important manners and rulings that a Muslim would do well to observe and heed. These are among the beauties and perfections of this Shariah and demonstrate its comprehensive concern for every aspect and circumstance of human life.
Al-Bukhārī narrated in his Sahīh from Abū Hurayra, may Allah be pleased with him, that the Prophet, peace and blessings be upon him, said: “When one of you sneezes, he should say, ‘All praise is due to Allah.’ His brother or companion should then say to him, ‘May Allah have mercy on you.’ When he says, ‘May Allah have mercy on you,’ the sneezer should reply, ‘May Allah guide you and set your affairs aright.’”3 That is, your circumstances.