I prayed behind God's Messenger, and on sneezing I said, “Praise be to God, great, good, blessed and abounding in good, as our Lord wishes and is pleased with.” When God's Messenger finished his prayer he moved away and asked, “Who was it who spoke during the prayer?” but no one replied. He asked a second time, but no one replied. He asked a third time, and Rifa'a said, “I did, Messenger of God.” Thereupon the Prophet said, “By Him in whose hand my soul is, over thirty angels raced to it to see which of them would ascend with it.”
Ibu ‘Umar said he asked Bilal how the Prophet responded to them when they greeted him while he was engaged in prayer, and he replied, “He used to make a sign with his hand.”
Tirmidhi transmitted it. In Nasa'i’s version there is something similar, but Suhaib occurs instead of Bilal.
Abu Huraira reported God’s Messenger as saying, “Yawning during prayer comes from the devil, so when one of you yawns he must restrain it as much as possible.”
Tirmidhi transmitted it. In another version by him and by Ibn Majah it says, “He should put his hand over his mouth.”
Before we went to Abyssinia we used to greet God’s Messenger when he was engaged in prayer and he would respond to us, but when we returned from Abyssinia I came to him and found him praying. I greeted him and he did not respond to me, but when he finished his prayer he said, “God creates new commands as He wishes, and one of them is that you must not talk during prayer.” He then returned my greeting and said, “Prayer is solely for the purpose of reciting the Qur’an and making mention of God, so when you are engaged in it let that be what occupies your attention.”