Ruling on saying al-hamdu Lillah after sneezing when praying
Question

If a person is praying and he sneezes, should he say al-hamdu Lillah, whether it is an obligatory or naafil prayer?.
Praise be to Allah.Yes, it is prescribed for him to say al-hamdu Lillah, because it is proven in the saheeh hadeeth that the Prophet (peace and blessings of Allah be upon him) heard someone say al-hamdu Lillah after sneezing and he did not rebuke him, rather he said: “I saw such and such a number of angels, all of whom were hastening to write it down.” And because praising Allah is akin to the phrases of prayer, and is not contrary to it."(Majmoo’ Fatawa al-Shaykh Ibn Baz 29/348).