Perhaps your boss thought you were nervous or had an itch. At my second job, I stim constantly (all the others who run the CNC lathes do as well - I'm beginning to think this is an Aspie job. At least a couple of the others are diagnosed), whether it be talking to my machines, watching parts being "turned" (cut) or engaging in tactile stimming (touching inserts, milling heads, turrets, tailstock, chuck, feeling the vibration from the centering machine (by leaning up against it), etc.). Nobody seems to even notice.
This isn't the case with my other job, where such behavior would get you removed (the government doesn't play by the same rules as normal entities, hence the ADA guidelines do not necessarily apply).