Performing specific exercises can stretch and strengthen the piriformis muscle. In certain cases when medical treatment is recommended, your health care provider may prescribe muscle relaxants to help manage the pain. Surgery on the piriformis muscle is considered a last resort.