The night at মুযদালিফা is part of the হজ্জ journey, and the Sunnah is to pray Maghrib and Isha combined and shortened (qasr) upon arrival from আরাফাত, then rest until shortly before Fajr. If a হাজী falls asleep and misses the combined Maghrib and Isha সালাতs, they must pray them as soon as they wake up, because নবী করীম (সাল্লাল্লাহু আলাইহি ওয়া সাল্লাম) said: 'Whoever sleeps through a সালাত or forgets it, let him pray it when he remembers it, for that is its time.' Prayer is never waived due to sleep or forgetfulness.
Regarding the stay itself at মুযদালিফা, the majority of scholars (Hanafi, Maliki, Shafi'i) consider it wajib (ওয়াজিব). The Hanbali school considers it a rukn (pillar) of হজ্জ according to one opinion, though the well-known position is that it is wajib. Sheikh Ibn Baz held that the stay at মুযদালিফা is wajib, and missing it without a valid excuse requires a dam (sacrifice). If a হাজী was present at মুযদালিফা even briefly during the night or before Fajr, they have fulfilled the requirement.
Sheikh Ibn Uthaymeen clarified that if a হাজী arrived at মুযদালিফা, fell asleep, and woke up after Fajr having missed the entire nighttime দোয়া and the Fajr সালাত at মুযদালিফা, they should pray what they missed immediately. Their হজ্জ is valid because they were physically present at মুযদালিফা. However, they missed the Sunnah of the lengthy দোয়া after Fajr at Mash'ar al-Haram. The stay itself was fulfilled by their physical presence during the night, even while sleeping.