Metformin is one of my favorite medications. But about 10-15% of people can not tolerate it due to stomach issues. People who does, may develop vit B12 deficiency and elevated homocysteine. High level of homocysteine is pro-inflammatory and can be associated with higher chances of blood clots, heart attacks and strokes. Usual therapy for homocysteinemia is high doses of vit B6, vit B12 and folic acid, preferably as methylcobalamin or methylfolate for patients with MTHFR gene mutation.

Current study looked at 1,856 normoglycemic individuals, 318 who were on metformin but hyperglycemic, and 1,986 who were hyperglycemic and not taking metformin.

Metformin users had 45% higher odds of having B12 deficiency and 48% higher odds of being vitamin B6 deficient, both significant results.

There was about 34-36% higher chances of cognitive dysfunction in study participants on metformin.

Vit B6, vit B12 and folate are all important for brain function. If you take Metformin, please ask your doctors to check your vitamin and homocysteine levels and start on replacement to keep your levels optimal.

Prospective studies are needed to see if this replacement will improve cognition, but previous studies in older adults did show improved mental function with vit B 12 supplements. 

https://academic.oup.com/jcem/advance-article-abstract/doi/10.1210/jc.2018-01791/542102