The Prophet said: “If one of you breaks wind during his prayer, let him hold his nose and leave.” Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
“Let him hold his nose”– al-Khattaabi said: He instructed him to hold his nose so that people would think that he has a nosebleed. This comes under the heading of good manners in concealing a shameful matter, hiding that which is offensive and giving the impression that what has happened is something different. It does not come under the heading of showing off or lying; rather it is a kind of euphemism, observing decency and seeking to protect oneself from people’s criticism.”
[Awn al-Ma‘bood, 3/326:]