I am recently having the same exact hip pain as you! Both legs, when I sleep, worse on the right side. I certainly hope someone can give us a better answer than the above. Mine started all of a sudden. I have arthritis, but I've never experienced this hip pain when I sleep. Hope you (and I) find an answer. Good luck to you!
hard to say without examining you