I actually first thought I had tourette's syndrome, before I got diagnosed with DID, because I too experienced muscle spasms.
When someone was triggered, there would generally be some sort of 'involuntary' muscle movement.
It actually turned out to be my alters reacting to something.
Sometimes, if I didn't express myself, they would jerk, twitch, repeatedly flap, or get stuck in a specific way, to self soothe
or trying to get out. Also, to try and get my attention.
I found that certain kids did specific movements, and it helped as a precursor to know who was out.
I also used to take video of myself, to analyze, until I was told by my sweetheart that I am a person- not a test subject.
It's great to want to learn more, but it helps so much to normalize your experience as well.
However, I also had a third party to help me figure out what movements belonged to who- which a camera could be very
useful for.
Some things that I find are precursors to switching or 'tics' (involuntary muscle spasms):
Not saying what I want to say.
Waiting too long to do something I want to do.
Not dealing with anxiety or stress properly.
Being triggered, seeing or hearing something triggering.
I find my tics to generally be a release of stress, so try:
a) Grounding yourself... deep breathing... relaxing... take down your anxiety or stress
b) Say what you want to say... don't push yourself past your limit
c) Ask your alters what is bothering them, what is wrong, how you can help
d) Tell your alters to calm down, let them know you can handle it, and that you value their input
Also, maybe an alter is trying to wake up and say something, and you are suppressing them!
Let them know that it's okay to let you know how they feel, but it is not safe for them to suddenly come out and switch.
This isn't always possible early in the healing process, but it's important to set boundaries with alters,
just as it's important to set boundaries with children. It keeps them safe and helps them feel safe.
I find that I haven't had tics very often since I've been learning to release my own stress and to
help my alters with their stress as well.
The closest thing I get to a tic now is F randomly blurting something to let me know that I worry too much.

Hope this helps <3 Have a great day, don't get too frustrated with yourself, and have lots of patience