Full Sharh — Mishkat al-Masabih 928
وَعَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا تَثَاءَبَ أَحَدُكُمْ فَلْيَكْظِمْ مَا اسْتَطَاعَ فَإِنَّ الشَّيْطَانَ يَدْخُلُ» . رَوَاهُ مُسلم وَفِي رِوَايَةِ الْبُخَارِيِّ عَنْ أَبِي هُرَيْرَةَ قَالَ: " إِذَا تَثَاءَبَ أَحَدُكُمْ فِي الصَّلَاةِ فَلْيَكْظِمْ مَا اسْتَطَاعَ وَلَا يَقُلْ: هَا فَإِنَّمَا ذَلِكُمْ مِنَ الشَّيْطَان يضْحك مِنْهُ "
English Translation
Abu Sa'id reported God’s Messenger as saying, “When one of you yawns during prayer he must restrain it as much as possible, for the devil gets in.” Muslim transmitted it. In a version by Bukhari from Abu Huraira he said, “When one of you yawns during prayer he must restrain it as much as possible and not say ‘Ha’, for that comes from the devil who is laughing at him.”(Or “at it”, i.e. at this action).
Source
Mishkat al-Masabih(مشكاة المصابيح)
Prayer
Hadith Number
928