One possible explanation for the association between hypomagnesemia and T2D is that insulin plays a vital role in controlling the reabsorption of Mg2+ in the kidney through modulating TRPM6 channel activity. This evidence concerns the gene TRPM6 and type 2 diabetes mellitus.