Amina Inloes, Amina Inloes is originally from the US and has a PhD in Islamic Studies from the University of Exeter on Shi'a hadith. She is the program leader for the MA Islamic Studies program at the... Answer updated 7 months ago

It is unlikely that Sufi orders took these practices directly from Imam Ali (A) although they may sometimes ascribe them to Imam Ali (A) as a form of piety. However, it's not unheard of for these things to be done among Shi'i mystics, and in general these practices are found in the mystical traditions in many regions. Maybe they can be viewed more like exercise similar to how if one wishes to strengthen one's muscles, one can lift weights, regardless of one's religious affiliation(s).