Answer
Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this regard, the late Saudi scholar, Shiekh Ibn `Uthaymeen, states:
The evidence that it is obligatory is the verse in which Allah says: “There is no sin on you if you seek the Bounty of your Lord (during pilgrimage by trading, etc.). Then when you leave Arafat, remember Allah (by glorifying His Praises, i.e. prayers and invocations, etc.) at the Mashar-il-Haram. And remember Him (by invoking Allah for all good, etc.) as He has guided you, and verily, you were, before, of those who were astray.” (Al-Baqarah 2:198)
The basic principle with regard to commands is that they are obligatory unless there is evidence to indicate otherwise.
The Prophet (blessings and peace be upon him) said to Urwah ibn Mudarris (may Allah be pleased with him), when he met him at Fajr prayer on the day of Muzdalifah, when he said: O Messenger of Allah, I have worn myself out and I have exhausted my camel; there is no hill on which I did not stand. The Messenger of Allah said: “Whoever attended this prayer of ours and stood with us until we moved on, and stood in Arafah before that, by night or day, has completed his Hajj and completed his rituals.”
The Prophet (blessings and peace be upon him) granted a concession to the weak allowing them to move on from Muzdalifah at the end of the night, and the concession indicates that the original principle is that it was a duty and a must. In fact, some of the scholars are of the view that stopping in Muzdalifah is one of the pillars or essential parts of Hajj, because Allah, may He be exalted, enjoined it in the verse mentioned above.
And the Prophet (blessings and peace be upon him) adhered to that and said: “I have stopped here, and all of Jam‘ – i.e. Muzdalifah – is a place of stopping.” (Muslim) But the moderate scholarly view is that staying overnight in Muzdalifah is obligatory but is not an essential part or pillar and is not a Sunnah.
Allah Almighty knows best.
Source: www.islamqa.info.