In the name of Allah,
Narrated Abu Huraira:
The Prophet (ﷺ) said, “If anyone of you rouses from sleep and performs the ablution, he should wash his nose by putting water in it and then blowing it out thrice, because Satan has stayed in the upper part of his nose all the night.”[I]
Scholars have offered a variety of interpretations of this statement. The most significant are:
Because the devil cannot whisper to man while he sleeps, he spends the night at the tip of his nostril casting unpleasant dreams into his brain and preventing him from having pleasant ones. As a result, the Prophet (peace and blessings of Allah be upon him) advised washing the inside of one’s nose to eliminate the devil’s dirt and odor.
Qadi Iyad said it is probable that this statement is meant literally. The nose is an opening through the mind. All body openings have shutters except for the nose and ears. A hadith mentions that Satan does not open what is shut. Moreover, an order is given to suppress yawns to prevent Satan from entering the mouth.[ii]
Imam As Sanani stated: It may be that it is a figurative expression because excretion gathers in the nose and causes laziness, indolence, slackness, and negligence. And all these states are satanic dispositions. Blowing water out of the nose upon awakening from sleep might be performed as an individual act or along with ablution. it is considered obligatory by Ahmed and Sunnah by the majority[iii].
[i] Sahih al-Bukhari 3295
[ii] Sahih Muslim (Volume 3): With the Full Commentary by Imam Nawawi (Al-Minhaj bi Sharh Sahih Muslim), Translated by Adil Salahi, page 55
[iii] Bulugh al-Maram – Collection of hadith by al-Hafidh ibn Hajar al-Asqalani. With brief notes from the book Subul-us-Salam written by: Muhammad bin Ismail Al-Sanani. English Publication- Book 1, Hadith 34. Darus-salam Publishers.