Depends on the pain. It depends on how severe the pain is and it's duration. If it is just an ache and short lived and does not stop you, it is ok. Otherwise, try cross training if only doing one type of a exercise and incorporate stretchiing and core muscular workouts as well. Sometimes, otc medication prior to working out or biking may help. If this persists at a level that limits you, then seek evaluation .
Rest and NSAIDs. After a long ride, back pain is not an uncommon complaint. Before a ride, stretch, and take Aleve (naproxen) or motrin. A program of core strengthening for your lower back may help prevent those post-ride aches and pains. If it continues to bother you, massage will help, but you might consider having it checked out by a trained professional to see if its more serious than just back strain.