It could it be Lactic Acid build up. Metformin can cause Lactic Acidosis which will cause pain in muscles while exercising that goes off after activity is finished.
"Some drugs, including metformin, a drug used to treat diabetes, and all nucleoside reverse transcriptase inhibitor (NRTI) drugs used to treat HIV/AIDS can cause lactic acidosis. If you are on any of these medications and have any symptoms of lactic acidosis, get medical help immediately."