Abu Hurairah reported the Messenger of Allah ﷺ as saying: when any of you prays and takes off his sandals, he should not harm anyone by them. He should place them between his feet or pray with them on
Related hadith on this topic
Explanation & Benefits
Shaykh Umar Farooq Saeedi
655. Commentary:
➊ It is permissible to pray both after removing the shoes or while wearing them. However, occasionally praying with shoes on, with the intention of reviving the Sunnah and expressing opposition to the Jews, is a cause of reward and virtue. Nevertheless, care should be taken that this action does not become a cause of discord among the uninformed masses.
➋ It is forbidden (haram) to cause harm to any Muslim in any way.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 655