Staying overnight in Mina on the nights of the 11th and 12th (and the 13th for one who delays departure) is an obligation (wajib) of Hajj according to the majority. The evidence is that the Prophet stayed there and granted his uncle al-Abbas a special exemption to spend those nights in Makkah only because of his duty of watering the pilgrims (siqaya) — a specific exemption would be meaningless if it were optional for everyone. Allah commands remembrance during these "numbered days" (2:203), and one who abandons the overnight stay without excuse owes a compensatory sacrifice (fidyah) per the majority.
Q&A · Hajj
Is it required to spend the nights at Mina during the days of Tashreeq?
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.