This seems to be a muscle pain of your hip joint region. A stiff muscle/s secondary to your sitting habits. What is your profession? How much do you sit? How do you sit?
The stiff or tight muscles give you pain and once you give rest, knowingly or unknowingly, they settle down and you again do something which they don't like. Is the gap between the painful episodes may be reducing over time?
Next Steps
sitting and workstation ergonomics, appropriate stretching exercises
Health Tips
we can do a teleconsultation if you want.