More than likely it is the threonate form that is causing problems, stop it and see if the issues go away. Magnesium comes in many forms and each form has its unique properties.
Always best to get a hair analysis to assess total body stores of magnesium and other minerals. Personally I like Trace Elements