INS and Hyperglycemia: Patients with diabetes had increased magnesium excretion in the urine, which is due to hyperglycemia, hyperfiltration, and the effect of insulin on the renal channels of magnesium48.