You probably shouldn't engage in any sort of vigorous exercise when suffering from back pain, but light stretching and exercise can ease stiffness. Especially once the back pain has subsided somewhat, it's important to move around as much as you can without overdoing it. Over the long haul, you can gain some back pain relief by strengthening your core muscles, especially those that support your spine.