Sahih Muslim Book 7, Hadith Number 3016.

Chapter : It is essential to stay (for two or three nights) at Mina during the days of Tashriq (11th, 12th and 13th) and exemption from this command for the suppliers of water.

Ibn Umar (Allah be pleased with them) reported that al-‘A’bbas b. Abd al-Muttalib (Allah be pleased with him) sought permission from Allah’s Messenger (may peace be upon him) to spend in Mecca the nights (which he was required to spend) at Mina on account of his office of supplier of water, and he (the Holy Prophet) granted him permission.