If you are pregnant most likely it's from the hormone "relaxin". The further along you get the more of this your body produces. It helps to relax the hip joints so that they can spread and allow the baby easier access to come down the birth canal. Unfortunately this can be very uncomfortable not only in the hips but other joints as well as they all loosen up prior to delivery due to this hormone. In my last couple of pregnancies I have had really sore hips and they hurt just to walk. It never hurts to speak with your doctor for reassurance when you are concerned abuot something though.
If you are NOT pregnant, then I would definately go be seen.
could be being in a relaxed state that your body loosens up, i would try different positions and see what works best for you