Sunan Ibn Majah, Book 5, Hadith 420 (Ibn Majah 1222)

It was narrated from ‘Aishah that the Prophet (ﷺ) said:

“When anyone of you performs prayer and commits Hadath, (passing wind) let him take hold of his nose, then leave.” Another chain with similar wording.