“I saw the Messenger of Allah (ﷺ) performing prayer both barefoot, and while wearing sandals.”

Sunan Ibn Majah Book 5, Hadith 236