Seized up from cycling

I am training for my 6th Ironman race. Over the last 3 months, I have had hip and back pain while sleeping. It goes away once I am moving. But this week after some of my bike rides I have been seized up after getting off the bike and yesterday I couldn’t do my brick run at all. My power on the bike is also suffering. I feel more comfortable in aero than sitting up, too. I do basic stretches for my psoas and hip flexors but wondering if anyone else has experienced this and if they have a good stretch routine? How long did it take to feel relief? I assume that my hamstrings are “stretched long” but don’t know how to fix that. Any ideas at all would be great.

Do you do any sort of strength training? Usually the fix for this or similar issues is to not only stretch the anterior muscles but to strengthen the posterior. So things like glute bridges, RDLs, Hip abduction, etc that work the hamstrings, glutes, and lower back.