The Sunnah is to remain in Muzdalifah until dawn breaks, pray Fajr there at its earliest time, then stand making supplication until the horizon is clearly lit, and after that proceed to Mina before sunrise.
If the pilgrim belongs to the weaker groups—such as women, children, and the like—he may leave Muzdalifah for Mina earlier, once the moon has set. The able-bodied person responsible for such pilgrims may likewise depart with them after midnight. Able-bodied pilgrims who are not accompanying the weak, however, should not leave Muzdalifah until dawn has broken; they should perform Fajr there and remain in supplication until the light of day is manifest.
Spending the night in Muzdalifah is an obligatory rite of ḥajj. It may not be omitted by anyone who reaches the site before midnight. Whoever arrives after midnight fulfills the obligation by staying even for a short while, although it is preferable for him to remain until dawn, pray Fajr there, and then supplicate.
Al-Mughnī states: “Whoever does not reach Muzdalifah until the latter half of the night bears no liability, because he did not experience any portion of the first half, and therefore its ruling does not apply to him.”
Those with valid excuses are allowed to forgo spending the night in Muzdalifah—for example, a patient who must remain in hospital, and the person whom the patient needs to care for him,