The Prophet (ﷺ) offered the Zuhr, `Asr, Maghrib and `Isha' prayers and slept for a while at a place called Al-Mahassab and then he rode towards the Ka`ba and performed Tawaf (al-Wada`).
Sahih al-Bukhari Book 25, Hadith 240