The Prophet ﷺ said, "Allah likes sneezing and dislikes yawning, so if someone sneezes and then praises Allah, then it is obligatory on every Muslim who heard him, to say: May Allah be merciful to you (Yar-hamuka-l-lah). But as regards yawning, it is from Satan, so one must try one's best to stop it, if one says 'Ha' when yawning, Satan will laugh at him." (Using translation from Bukhārī 6223)
"إِنَّ الله يُحبُّ الْعُطَاسَ، وَيَكْرَهُ التثاوُب فإذَا عَطَس أحَدُكُمْ فَحَمدَ الله كَانَ حقًّا عَلَى كُلِّ مُسْلِمٍ سَمعَهُ أنْ يَقُولَ لَهُ: يَرْحَمُكَ الله، وأمَّا التَّثَاؤُبُ فَإنَّمَا هُوَ مِنَ الشَّيطَانِ. فَإِذا تثاءَبَ أَحَدُكمْ فليَردَّهُ ما اسْتَطَاعَ فَإِنَّ أحَدَكُمْ إِذا قَال: (هَا) ضَحِكَ الشَّيطانُ".