Praise be to Allah.
Allah has praised His believing slaves, and He says that one of their greatest characteristics is that they “offer their salaah (prayers) with all solemnity and full submissiveness” [al-Mu’minoon 23:2]. The Prophet (peace and blessings of Allah be upon him) stated that the Shaytaan strives to distract the worshipper from his prayer, and Allah is testing the believers with that. One of the ways in which the Shaytaan distracts the worshipper is by distracting his thoughts and whispering to him when he is praying. Another method is to make him yawn so much that this distracts him from his prayer. The Prophet (peace and blessings of Allah be upon him) stated that yawning comes from the Shaytaan, and he told us to suppress yawning as much as we can, but if yawning overtakes us, then he told us to put our hands over our mouths. There follow the texts of the ahaadeeth and commentary thereon:
It was narrated that Abu Sa’eed al-Khudri (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “If one of you yawns – according to another report: whilst praying – let him suppress it as much as he can, for the Shaytaan comes in.” Narrated by Muslim
It was narrated from Abu Hurayrah (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “Yawning comes from the Shaytaan, so if one of you feels the urge to yawn, let him suppress it as much as he can, for if one of you says ‘ha’ (the sound made when yawning), the Shaytaan laughs.” Narrated by al-Bukhaari, 3115; Muslim, 2994.
Al-Haafiz ibn Hajar (may Allah have mercy on him) said:
Ibn Battaal said: Yawning is attributed to the Shaytaan in the sense that he approves of it and wants it to happen, i.e., the Shaytaan likes to see a man yawning, because it is a state in which his appearance changes so he laughs at him. It does not mean that the Shaytaan causes yawning.
Ibn al-‘Arabi said: We have explained that every makrooh action is attributed to the Shaytaan in Islam because he is the means behind it, and every good action is attributed to the angel in Islam because he is the means behind it. Yawning is caused by a full stomach and leads to laziness, and that is by the means of the Shaytaan, whereas sneezing is caused by lack of food, and leads to energy, and that is by the means of the angel.
Al-Nawawi said: Yawning is attributed to the Shaytaan because it calls to desires, as it is caused by heaviness of the body and lassitude and fullness. What is means is: beware of the causes that lead to that, which is eating too much.
The phrase “if one of you feels the urge to yawn, let him suppress it as much as he can” means: let him try to stop it. It does not mean that he will be able to stop it, because what happens cannot be reversed, and it was said that what is meant by “if he feels the urge to yawn” is if he wants to yawn…
Our Shaykh – i.e., al-Haafiz al-Iraaqi – said in Sharh al-Tirmidhi: Most of the reports in al-Saheehayn refer to yawning in general terms, but in another report it is limited to yawning when praying. So it may be that the general wording is to be understood in terms of the specific. The Shaytaan is very keen to distract the worshipper when he is praying, and it may be that yawning is more makrooh in the case of prayer, but that does not necessarily mean that it is not makrooh in cases other than prayer.
The fact that it is makrooh in general terms is supported by the fact that it comes from the Shaytaan, as was clearly stated by al-Nawawi. Ibn al-‘Arabi said: Yawning should be suppressed in all situations, but especially in prayer because it is the situation in which it is most appropriate that it be warded off, because it distorts one’s appearance.
With regard to the phrase in the report by Muslim, “the Shaytaan enters” it may be that what is meant is entering in a real sense, because although the Shaytaan flows through man like his blood, he cannot gain any control over him so long as he remembers Allah, but when a person is yawning he is not remembering Allah, so the Shaytaan is able to enter him in a real sense.
Or it may be that what is meant by entering is gaining control over him, because the one who enters a thing is able to gain control of it.
As for the command to place the hand over the mouth, this is the case if he opens his mouth, so he should cover it with his hand, or if he yawns whilst his mouth is closed, he should still put his hand over it, lest it opens.
With regard to the meaning of placing the hand over the mouth or covering the mouth with one's garment, which serves the same purpose, the hand is mentioned in particular if yawning cannot be warded off otherwise. No differentiation is made in this regard between one who is praying and one who is not, rather it is more important in the case of prayer as stated above, and in this case an exception is made to the prohibition of placing the hand over the mouth when praying.
Another thing that is enjoined upon the person who yawns whilst praying is to stop reciting until the yawning has ended, lest he distort the recitation. End quote.
Fath al-Baari, 10/612
Al-Nawawi (may Allah 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
Shaykh Muhammad ibn Saalih al-‘Uthaymeen (may Allah have mercy on him) said:
Yawning comes from the Shaytaan, as is narrated in saheeh reports from the Messenger of Allah (peace and blessings of Allah be upon him). So if a person yawns, whether during prayer or otherwise, he should suppress his yawning if he can, and if he cannot, then he should place his hand over his mouth, whether he is praying or not.
Fatawa Noor ‘ala al-Darb
If a person wants to stop yawning during prayer, he should start to pray when he is energetic and active, and he should remember that the Shaytaan is an enemy to him and regard him as such, and he should try to resist him as much as he can, and if he overpowers him then let him put his hand over his mouth.
Shaykh Muhammad ibn Saalih al-‘Uthaymeen (may Allah have mercy on him) was asked:
I am a young religiously-committed man, twenty-two years old. I suffer from a problem which I hope you will help me to get rid of. When I start to pray, I start yawning unintentionally. This problem is with me even when I recite Aayat al-Kursiy in particular. I do not know of any reason for that. I yawn ten times in one prayer. I hope that you can advise me.
Yawning comes from the Shaytaan as the Prophet (peace and blessings of Allah be upon him) told us. Just as the Shaytaan tries to gain power over the one who is praying by whispering into his heart and throwing ideas into his mind, so too he may try to gain power over a person by means of yawning, so he yawns a great deal and that distracts him from his prayer. If anyone experiences that, let him do what was enjoined by the Prophet (peace and blessings of Allah be upon him), such as suppressing it as much as he can, and if he cannot, then let him place his hand over his mouth so that he will not give the Shaytaan any way to reach him.
He should strive to come to prayer when he is energetic and active, and he should ask Allah to protect him against what is happening to him in his prayer. If he asks Allah sincerely and does whatever he can to rid himself of this problem, Allah says (interpretation of the meaning):
“And when My slaves ask you (O Muhammad) concerning Me, then (answer them), I am indeed near (to them by My Knowledge). I respond to the invocations of the supplicant when he calls on Me (without any mediator or intercessor). So let them obey Me and believe in Me, so that they may be led aright” [al-Baqarah 2:186]
And Allah knows best.