1,001 Sayings and Deeds of the Prophet
Satan and the Devils at Prayer Time
Allah's Apostle said, "When the call for prayer is made, Satan takes to his heels passing wind so that he may not hear the Adhan and when the call is finished he comes back, and when the Iqama is pronounced, Satan again takes to his heels, and when the Iqama is finished he comes back again and tries to interfere with the person and his thoughts and say, 'Remember this and that (which he has not thought of before the prayer)', till the praying person forgets how much he has prayed. If anyone of you does not remember whether he has offered three or four Rakat then he should perform two prostrations of Sahu (forgetfulness) while sitting."
The Prophet could have captured Satan (or it could have been a jinn) on one of these occasions, but then thought better of it.
Narrated Abu Huraira:
The Prophet once offered the prayer and said, "Satan came in front of me and tried to interrupt my prayer, but Allah gave me an upper hand on him and I choked him. No doubt, I thought of tying him to one of the pillars of the mosque till you get up in the morning and see him. Then I remembered the statement of Prophet Solomon, 'My Lord! Bestow on me a kingdom such as shall not belong to any other after me.' Then Allah made him (Satan) return with his head down (humiliated)."
How Satan steals a portion of a prayer:
I asked the Prophet about one's looking here and there during the prayer. He replied, "It is what Satan steals from the prayer of any one of you."
Satan may also be responsible for your waking up with your hair in knots, assuming you still have hair.
Narrated Abu Huraira:
Allah's Apostle said, "Satan puts three knots at the back of the head of any of you if he is asleep. On every knot he reads and exhales the following words, 'The night is long, so stay asleep.' When one wakes up and remembers Allah, one knot is undone; and when one performs ablution, the second knot is undone, and when one prays the third knot is undone and one gets up energetic with a good heart in the morning; otherwise one gets up lazy and with a mischievous heart."
Satan may also be responsible for the color of the wax in your ear.
A person was mentioned before the Prophet (p.b.u.h) and he was told that he had kept on sleeping till morning and had not got up for the prayer. The Prophet said, "Satan urinated in his ears."