My son does that. In his case, the OT explained it as being related to his hypomobility, in that with the loose joints not all the nerve signals sent actually get through to the brain, so a person with the condition is driven to seek more sensory input than normal just to get a sense of where they are in the air.
And there may just be some plain old sensory seeking behavior, as well.
My son does it without any realization he is doing it. It's not about curiosity or anything like that; it is very much at the instinctive / compulsion level.
_________________
Mom to an amazing young adult AS son, plus an also amazing non-AS daughter. Most likely part of the "Broader Autism Phenotype" (some traits).