Hi there,
One of the common side effects of metformin is bowel problems, try talking to your gp and ask to go onto slow release as its much more unlikely to cause this problem, it may also reduce the problem of pain if it is the combination of matformin and statins together causing it.
If I was...