For me, I found two causes: sitting too long with feet off the ground (either against wall or sitting cross-legged), and glute tightness. The glute tightness is strange because it feels like back pain, but really it's muscle tightness that goes away with foam rolling or dry-needling.