Well, the usual recommendation is to take half as much magnesium as calcium. The maximum recommended calcium intake is 2000mg, which means that magnesium intake would be a max of 1000mg. However, these dosages need to be customized, and it is safe to take more than 1000mg of Magnesium daily. So start with 500mg/day and slowly work your way up until either your muscle soreness seems to be improving or you get diarrhea. If you get diarrhea before your muscle soreness starts going away, back off your dose of magnesium by 250mg increments until no more loose bowels, then stay at the dose you had to go down to daily. I found for me that I needed the magnesium to help with my gut, and also I still got foot cramps if I only did half as much magnesium as calcium, so I was taking 2000mg magnesium (sometimes more) daily when I was able to get the pills down.
I was using a product called Chelated Magnesium made by Country Life (no financial connection, just a happy customer), some like pills/capsules of Magnesium Citrate (good absorption).
I hope this helps - take care,
Chronic Lyme Disease, Gluten & Sulfite Sensitivity, Many Food/Inhalant/Medication/Chemical Allergies & Intolerances, Asthma, Gut issues (dysmotility, non-specific inflammation), UCTD ("Secondary Lupus-Like Syndrome"), Osteoporosis, Pancytopenia, chronic malabsorption/malnutrition, etc.; G Tube; Currently TPN-dependent.
Meds: Zofran, Pulmicort, Heparin (to flush PICC line), IV Ceftazidime (for Pleural Effusion).