I saw the Messenger of Allah ﷺ praying both barefoot and wearing sandals.
حدثنا بشر بن هلال الصواف حدثنا يزيد بن زريع عن حسين المعلم
رأيت رسول الله ﷺ يصلي حافيا ومنتعلا
[Its chain of transmission is hasan] Reported by Abu Dawud, Prayer, Chapter on Praying in Sandals, no. 653, from the hadith of Husayn al-Muallim, through this same route.