I saw the Messenger of Allah ﷺ praying both barefoot and wearing sandals.
حدثنا مسلم بن إبراهيم حدثنا علي بن المبارك عن حسين المعلم
رأيت رسول الله ﷺ يصلي حافيا ومنتعلا
[Its isnad is hasan] Ibn Majah reported it, Establishing the Prayers, chapter on praying in sandals: 1038, from the hadith of Husayn Muallim through this route. Ahmad bin Jafar bin Hamdan Qutai'i also narrated it in his Juz al-Alf Dinar (144), from Fadl bin Habbab, from Muslim bin Ibrahim, through this route, with the wording, "I saw the Messenger of Allah ﷺ pray wearing sandals and barefoot, drink standing and sitting, fast while traveling and break his fast, and turn in prayer to his right and his left." Ahmad likewise reported it (2/215) and others, from the hadith of Husayn Muallim through this route, at greater length.