I found an easy exercise to do to get rid of hip flexor pain and stiffness.
I used to sit a lot at my desk at work and realized that sitting was only making my hip flexor stiffness worse.
Now, I try to get up and walk more or at least do some work standing up.
The exercise I do that help me involve keeping my body upright and putting one knee on the ground.
I use a pole to hold the pose while I rotate my hips while squeezing my glutes and moving forward at the hip.
The pose looks like a lunge but you have to be careful when doing it.
If you have had bad pain or stiffness it is a good idea to visit a doctor about your hip flexor issue
Sometimes it is caused by poor motor coordination and you will want to rule out any other more serious condition before tackling the issue with gentle exercises.
Usually, hip flexor pain is caused by tight muscles and can be remedied by exercising.
But, it can also be caused by muscle tears so make sure to have your situation diagnosed by a doctor.