As medications are created and used for their original purpose, doctors often find that these medications also can help with other problems. When this happens often enough, some medications start getting prescribed as off-label, or used for an issue that has not been FDA approved.
In the case of several antidepressants, doctors found that some of them also help relieve pain, although how they do it, researchers aren’t entirely sure. In your mother’s case, if the doctor is monitoring the dosage and any potential side effects, your mother’s pain appears to be responding well to the prescribed medication.