Magnesium Helps pains??

does magnesium help with pains and cramps?? so my arms have been hurting alittle today and i think i know why cuz i beeen on my phone all day... I gotta stretch it out but its a weird feeling its not really in pain but it does feel Achey and hurt.... Can magnesium help it calm down???? and also im on my period...with cramps😫