If it better during SD, I think it might be workout-related. I can see a mineral deficiency causing it, but I don,t know if you can pin point it down to magnesium. It’s called twitches.
Just make sure you cool down after your workouts. Do some stretches and arm rotation and basic calisthenics. Take a multivitamin. Hope you are getting plenty of fruits and vegetables. If you get it again, we will take a closer look.