I had a trapped nerve, what worked for me is plenty of straight leg stretching, squats and leg press nice and deep to really stretch out the muscles.
Unfortunately Taekwondo kicks seem to aggravate it, so I just tone them down a bit now.
My sister had surgery for bulging disc, long recovery period though.