The Messenger of Allah ﷺ said, "I forbade you from three things, and now I command you to do them. I forbade you from visiting graves, but now visit them, for there is a reminder in visiting them. I forbade you from drinking from any container except leather skins, but now drink from any vessel, provided you do not drink anything intoxicating. And I forbade you from eating the meat of sacrificial animals after three days, but now eat it and make use of it during your travels."
حدثنا أحمد بن يونس حدثنا معرف بن واصل عن محارب بن دثار
قال رسول الله ﷺ نهيتكم عن ثلاث وأنا آمركم بهن نهيتكم عن زيارة القبور فزوروها فإن في زيارتها تذكرة ونهيتكم عن الأشربة أن تشربوا إلا في ظروف الأدم فاشربوا في كل وعاء غير أن لا تشربوا مسكرا ونهيتكم عن لحوم الأضاحي أن تأكلوها بعد ثلاث فكلوا واستمتعوا بها في أسفاركم
Muslim narrated it in the Book of Funerals, chapter on the Prophet's ﷺ seeking permission from his Lord, Mighty and Majestic, to visit his mother's grave, hadith no. 977, from the hadith of Muharib bin Dithar, with the same wording.