The ruling of the Hajj Pilgrim spending the Night in Makkah during the Days of At-Tashreeq
Question :
It is known that the Hajj pilgrim is required to spend the night in Mina during the days of At-Tashree. However, if the person does not want to sleep at night, can he go outside of Mina and stay in the Haram (ie., the Sacred Mosque) to perform extra acts of worship? May Allah give you success.
Answer:
The intent of the statement of the people of knowledge that spending the night in Mina during the days of At- Tashreeq is obligatory is that the person remains in Mina, whether he is sleeping or awake. The intent is not only that he be sleep. Based on this, we say to the questioner that it is not permissible for you to stay in Makkah Al-Mukarramah during the days of At- Tushreeq. Rather, it is obligatory on you to be in Mina.
However, the people of knowledge say that if the person spends most of the night in Mina that suffices him. And if he cannot find a place in Mina, it is obligatory that he stays at the end of the last tent (in Mina) and he may not go to Makkah Al- Mukarramah. Rather, we say that if you cannot be in Mina, look for the last tent from the tents of the Hajj pilgrims and be next to it, because the obligation is that the people be with each other. Likewise, we also say if the Masjid is filled with people, then verily, they are to line up in rows near each other (i.e., even if the rows go out of the Masjid). And Allâh knows best.
Source:
Ash-Shaykh Ibn 'Uthaimin
Fatawa Islamiyah, Vol. 4 Pages 232-233