These movements are used only to stimulate one’s own senses. These are called stereotypies (also known as self. Many individuals on the autism spectrum.
Hand Flapping Cure at Brian Thompson blog
These behaviors provide comfort or sensory input and can occur in response to various emotions.