Fiqh-us-Sunnah Volume 5, Hajj and ‘Umrah, Fiqh 5.100A.
Jabir says: “When the Prophet (peace be upon him) reached Muzdalifah, he offered both Maghrib and ‘Isha prayers, then he lay down to sleep. He slept until dawn, then he got up and offered Fajr prayer, and mounted his she camel, Al-Qaswa. When he reached Al-Mash’ar Al-Haram he stopped there until there was light all around, then before sunrise, he left the place. There is no evidence to show that the Prophet (peace be upon him) spent the night (at Muzdalifah) in prayers and supplications. This is the correct position about spending the night at Muzdalifah and stopping there in the light of the practice of the Prophet (peace be upon him).
Ahmad holds that spending the night at Muzdalifah is obligatory for all pilgrims except shepherds and water providers for whom it is not obligatory to do so. All the imams of schools of Islamic law consider stopping and spending some time at Muzdalifah obligatory. They do not, however, regard spending the entire night there as obligatory. Spending some time there, means being present physically, in any posture or condition, standing, sitting, being awake or asleep, walking. or passing by.
The Hanafi school is of the opinion that it is obligatory to be present at Muzdalifah before the dawn of Yaum al-Nahr (the 10th of Zhul-Hijjah). So, if one fails to do so without a genuine excuse, one must offer a sacrifice unless one has a genuine excuse in which case one is not obligated to be physically present, nor does one incur any penalty.
The Maliki school holds that stopping at Muzdalifah, before dawn, and spending some time there is enough, while going from Arafah to Mina, is obligatory when one has no excuse to do otherwise. For a pilgrim with a genuine excuse stopping and staying at Muzdalifah is not obligatory.
The Shafi’i school holds that only the physical presence in the second half of the night of the 10th of Zhul-Hijjah at Muzdalifah, after spending the day at Arafah, is obligatory. One is not required to spend the entire night there, nor is it essential even to make sure whether the place one is staying is within the boundaries of Muzdalifah.
It is the sunnah, however, to offer Fajr prayer at its early time, then head for and stop at Al-Mash’ar al-Haram till daylight spreads before the sunrise. One should spend this time in supplication and remembrance of Allah. Allah says in the Qur’an (2.198): “Then when you pour down from (mount) Arafah, celebrate the praises of Allah at the Sacred Monument and celebrate His praises as He has directed you, even though, before this, you went astray. Then pass on at a quick pace from the place whence it is usual for the multitude to do so, and ask for Allah’s forgiveness. And Allah is Oft-Forgiving, Most Merciful.”
Before sunrise, the pilgrims leave Muzdalifah tor Mina, but when they pass through the valley called Muhassir, they should pass it at a quicker pace.