Narrated Abdullah ibn Amr ibn al-'As: I saw the Messenger of Allah ﷺ praying both barefooted and wearing sandals.
The Prophet Muhammad's example serves as a reminder for us that we should always strive to do what is best for ourselves spiritually while still being mindful of our physical needs and comfort levels. We should not be too hard on ourselves when it comes to matters related to worship but instead seek balance between following Islamic teachings while also taking into account our own individual needs and circumstances.