All perfect praise be to Allah, The Lord of The Worlds, and may His Peace and Blessings be upon our Prophet Muahmmad and upon all of his family and companions.
Too much movement while performing prayer renders it invalid and it is impermissible for the praying person to make movements deliberately, even a few. This is in order to be on the safe side as far as the teachings of Sharia are concerned. Some scholars stated that making movements, while praying, for teaching children how to pray is reprehensible and cannot be considered a sound excuse, because this mission can be accomplished before or after prayer.
Moreover, it is stated: "Too much movement while performing obligatory prayer renders it invalid save when performing the prayer of fear and voluntary prayer while on a ride since too many or a few movements in these two cases, even on purpose, doesn`t invalidate one`s prayer; especially in these too cases." [Mughni Al-Muhtaj vol.1/pp.199]. And Allah Knows Best.