We have had similar experiences to this for a young lady who had Triple X syndrome, who later received a diagnosis of Tourette’s as well.
We found that the extended periods of tics often occurred when her anxiety was heightened. Sometimes around particular staff or subject areas where she felt she would get into “trouble” for her tics which she tried to suppress which when she then released were significant and long lasting.
We also found that they were more prevalent when she experienced sensory overload and regular sensory regulating activities really helped with this.
No immediate answers I’m afraid, for us it was lots of discussion with the pupil, parents, staff, peers (to help them understand so the pupil was less anxious) and Occupational Therapy from a sensory perspective and we all learned together and managed to explore it in good humour.