I was reading a post from a type 2 diabetic. They were asking about why they have cramps in the calves of their legs. I have experienced that. And, I figured out what was causing it and how to fix it, for me.
I have been talking metformin for years. I have been talking Nexium even longer, for gastric reflux. I discovered that the combination, and sometimes either medication alone, can work to restrict your intake of vitamin B12. Low vitamin B12 can cause a large list of medical problems. One of those is nerve pain and muscle cramps. I increased my intake of B12 and the preponderance of the nerve pain and muscle cramps subsided.
You can take up to 5000 mcg without any problems. Comes in pill form to take by mouth with water. And, if you still have problems absorbing it, it can be purchased in a sublingual pill form to be dissolved under the tongue. It will be absorbed directly into the blood stream through the bottom of your tongue. Takes a few minutes to dissolve. But, very effective.
I truly hope others will be helped by this.