A.L.
I have experienced that type of pain often.. In part, for me, I believe it's due to Sciatica.. If you look online as to where the Sciatic Nerve is located, you'll notice that it's up near the hip.. In some cases and due to swelling of of the uterine wall as we get closer to menstruation, there can be added pressure on the nerve, hence resulting in hip pain. Apart from Ibuprofen which I don't like to take too much of... I try and do a yoga pose called Tadasana.. If you aren't familiar with yoga, it's a pose you do while standing up and by doing it, you are making your hips go directly forward as oppose to flaring out to either side.. (ever notice how many pregnant women jut their stomachs out while at the same time their hips kinda turn more outward) well that motion can cause misalignment and again cause ones hips to hurt. Of course, after pregnancy, if a person doesn't work on getting their hips back into alignment, the problem can worsen...
IF you look online, there are free sites that demonstrate the above yoga pose. I have found it works and I do it as often as possible.. E.g. I do it while washing dishes .. Basically, I work hard at getting my hips in more alignment. Also, if you have a sitting job, that too will cause our hips to jut to either side and of course, weight gain.
Bottomline.. For me, I have had to lose weight, do a lot of stretching (this too helps a lot) and work on body alignment..
good luck to you :)