“The Prophet (ﷺ) did not allow anyone to stay overnight in Makkah apart from ‘Abbas, for the purpose of supplying water to the pilgrims.”
Sunan Ibn Majah Book 25, Hadith 185