i have had that happen. those drugs can cause severe muscle cramps. it should say that on the side effects. it happens to me ever so often if i have to take them. it depends on the kind, some do it, some don't (to me). i would have the dr switch to a different kind of pain killer or at least a different brand.
you would have to take quite a bit to kill your liver, so don't freak out, it just happens sometimes. keep hydrated (drink lots of water).