Absolutely, but it has to be the right type of exercise for your specific type of pain. For example, if you have back pain around the middle of your back, rowing exercises are great for relieving the pain. Stretching can alleviate pain from muscle spasms. At the same time, you wouldn't want to go running if you have foot pain. It really depends on the exercise and the pain.