The Prophet ﷺ said, "Allah loves sneezing and dislikes yawning. When one of you sneezes and praises Allah, it is the duty of every Muslim who hears him to say, 'May Allah have mercy on you.' As for yawning, it comes from Satan. So when one of you yawns, let him suppress it as much as he can, for when one of you yawns, Satan laughs at him."
عن النبي ﷺ قال: إن الله يحب العطاس، ويكره التثاؤب، فإذا عطس أحدكم وحمد الله، كان حقا على كل مسلم سمعه أن يقول له: يرحمك الله، وأما التثاؤب: فإنما هو من الشيطان، فإذا تثاءب أحدكم فليرده ما استطاع، فإن أحدكم إذا تثاءب ضحك منه الشيطان.
Bukhari narrated it in Al-Adab (6226) from Asim bin Ali, who said, Ibn Abu Dhib narrated to us, from Saeed Maqburi, from his father, from Abu Hurairah, and he related it.It has been narrated from Abu Hurairah that the Messenger of Allah ﷺ said, "Sneezing is from Allah, and yawning is from Satan. So when one of you yawns, let him put his hand over his mouth. And if he says, 'Aah, aah,' Satan laughs from inside him. Allah loves sneezing and dislikes yawning. So when a man says, 'Aah, aah,' when he yawns, Satan laughs inside him."Tirmidhi (2746) and Ahmad (7599) narrated it, and Ibn Khuzayma (921), Ibn Hibban (2358), and Hakim (4/263) graded it sahih, all of them through routes from Muhammad bin Ajlan, from Saeed Maqburi, from Abu Hurairah, and he related it. The wording is Tirmidhi's, and he said, "This is a hasan hadith."I say, this is what appears to be the case, for Ibn Ajlan's hadith is hasan. But there is a hidden defect in it, which Tirmidhi clarified after narrating it from the hadith of Ibn Abu Dhib, from Saeed bin Abu Saeed Maqburi, from his father, from Abu Hurairah (as it appears in Bukhari). He said, "This is more sahih than the hadith of Ibn Ajlan. Ibn Abu Dhib has better memory of Saeed Maqburi's hadith and is more reliable than Muhammad bin Ajlan. I heard Abu Bakr Attar Basri mention, from Ali bin Madini, from Yahya bin Saeed, who said, Muhammad bin Ajlan said, 'Some of Saeed Maqburi's hadiths were narrated by Saeed from Abu Hurairah, and some of them he narrated from Saeed, from a man, from Abu Hurairah. They became mixed up for me, so I made them all from Saeed, from Abu Hurairah.'"This is the defect in this hadith.