Question: If one sneezes during prayer, does one say Alhamdulillah?
If a person sneezes in the prayer, they should not praise Allah Most High after it by saying, “alhamdu li Llah,” as is normally the sunna, because this is not the time for extra invocations and remembrances (adhkar) which normally occur outside of the prayer.
However, if a person said it, their prayer would remain unaffected because it is a general remembrance which was not uttered as a form of communication with somebody else.
And Allah knows best.
قال الطحطاويّ في حاشيته على مراقي الفلاح ما نصّه: «وإنما قيد بالخطاب من المصلي لأنه لو قاله العاطس لنفسه لا تفسد لأنه بمنزلة قوله يرحمني الله وبه لا تفسد ظهيرية ولو قال الحمدلله فمن العاطس نفسه لا تفسد وكذا من غيره إن أراد الثواب إتفاقا» اهـ
DISCLAIMER: Please note that this specific religious answer is provided at the behest of the questioner, and they are not bound by its contents. Both the questioner and the reader are encouraged to consider well the applicability of this answer to their situation. The author is not responsible for any loss or damage which may occur through any reading or misapplication of this answer; nor is the violation of any law condoned.