All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
There is no basis for this in Islam. Shaking the legs is not prohibited and there is no prohibition reported in the religious texts in this regard as far as we know.
Allah knows best.