Strength training. Usually it's not any serious nerve dysfunction. For me specifically slow Jefferson curls, Romanian Deadlifts, and deep single legged squats were movements that helped it a lot. I would get it every single season I would ride my road bike a ton and after 5 years of bike fits, acupuncture, even chiropractor shit I finally saw a decent PT that is also a strength coach for a professional cycling team. Those dudes have a shit ton of hip, knee, and back issues so I figured he'd know what's up.
For me it was a lack of strength in my glutes that caused my lower back to "take over", which put pressure on the nerve. I tried deep stretching and yoga, which made it far worse to where I couldn't bend over to tie my shoes. Dropped all the voodoo and felt better and better each week and was pain free by week 8. He's a kook but Knees Over Toes gives similar advice but has a lot of kinda esoteric fluff movements I didn't find useful.