There are some good exercises to stretch a hip flexor. They all involve putting the leg or femur into extension in relation to the pelvis.
Like putting the leg behind the pelvis and onto a table and lowering the pelvis. There are some good illustrations of this on the web. Do a search on "psoas" stretch or "hip flexor" stretch. Remember to go slowly.