If he is not hurting himself, or anyone else with this behavior, and its not causing him any social issues, it sounds to me like he has developed some good restless energy releases and coping mechanisms --- I would not do a thing unless there is some other issue.
it sounds like to me that these are techniques he has developed to sooth himself. It's probably something he does unconsciously. he may be dealing with stress from school by doing these things. my questions for you to investigate would be these:
1. Does he only do this at school? Is this a new behavior? If only at school ask him if there is something happening at school that bothers him.
2. Are there any recent changes at school or at home? new teacher, new cirriculum at school, problems at home with husband, have you moved recently?
3. does he get enough sleep, physical exercize, does he watch too much tv/video games? does he eat too much sugar?
If everything sounds ok i wouldn't worry about it unless he is pulling out his hair, or causing injury to his fingers, it just sounds like a self soothing technique. If it is only happening at school there is probably some connection to social stress(dealing with being around a lot of kids/performing all day to the teachers requirements) then i would talk to the teachers and when they notice him doing these things if they could take time out to talk with him and reassure him that he's doing a great job and they are proud of him. i think that would help. I would also talk to his pediatrician about this and see what his doctor has to say about it. some compulsive behaviors are born out of a childs inability to deal with stress and they can follow him into adult life. my husband is a compulsive hair puller and he started it when he was 12 yrs old and still does it. some repetative behaviors indicate mild autism. this is why you should talk to your pediatrician about it. it could just be a phase of something that will pass. but talk to your doctor.