إِذْ يُغَشِّيكُمُ النُّعَاسَ أَمَنَةً مِّنْهُ وَيُنَزِّلُ عَلَيْكُم مِّنَ السَّمَاءِ مَاءً لِّيُطَهِّرَكُم بِهِ وَيُذْهِبَ عَنكُمْ رِجْزَ الشَّيْطَانِ وَلِيَرْبِطَ عَلَىٰ قُلُوبِكُمْ وَيُثَبِّتَ بِهِ الْأَقْدَامَ (11)
(8:11) And recall when Allah brought on you drowsiness, *8 giving you a feeling of peace and security from Him, and He sent down rain upon you from the sky that He might cleanse you through it and take away from you the pollution of Satan and strengthen your hearts, and steady your feet through it. *9
*8). In the Battle of Uhud the Muslims passed through a similar experience (see Al'lmran 3: 154 above). On both occasions, when prevalent conditions should have produced intense fear and panic among them, God filled their hearts with such peace and tranquillity that they were overpowered with drowsiness.
*9). This refers to the heavy downpour on the night preceding the Battle of Badr. It helped the Muslims in three ways. First, it provided them with an abundant water supply which they quickly stored in large reservoirs. Second, rain compacted the loose sand in the upper part of the valley where the Muslims had pitched their tents. This helped the Muslims plant their feet firmly and facilitated their movement. Third, where the Quray'sh army was stationed in the lower part of the valley, the ground turned marshy.
The defilement caused by Satan which occurs in the verse refers to the fear and panic which initially, afflicted the Muslims.