I used to get hip pain from just lying down on my side. My hips would ache and burn from the pressure. I couldn't lie on hard surfaces because it would feel sharp and poky.
These two videos will help you understand the problem as well as exercises to do to fix the problem.
Theory and Exercises: https://www.youtube.com/watch?v=dLAm_Hbbvfw
Follow Along Workout: https://www.youtube.com/watch?v=YqLchqRnUS0