I do private yoga (which is very expensive, so admittedly a poor solution for most, but I really love it). I found an instructor who is a former cyclist and told him from the get-go that I wanted to work on core & upper body strength plus hamstring and hip flexibility. That is all we do in our sessions and it really is pretty athletic/intense/hard work. I ride very comfortably for 5-6-7 hours with nothing but soreness in the back of my neck from holding my own head up. No neck pain, no back pain, no shoulder pain (admittedly I also improved my bike fit recently).
Im sure there are other approaches that would work as well, but I think yoga is pretty swell for cyclists.
H