Do you sleep with a pillow between your knees?
Try it. You might find that having your knees separated a tad may relieve a bit of pressure on the joint.
It will also help with the muscles.
Further, too hard of a bed is as bad (if not worse) for your hips, back and shoulders as a soft one. Finding one that has enough give so your spine is straight is sort of hard to do. We here switched to a thick futon made up of a 'solid' flannel core surrounded by micro-cell foam - it is a 'firm' mattress with a bit of give on the surface, all the aches and pains went away with that.
I would always suggest a feather bed on top of a firm mattress - unfortunately they are somewhat pricey

but they are comfortable, like sleeping on a cloud.
Since there is stiffness of muscle, and you can basically walk it off, I think the problem may also lie in your not moving enough while you sleep.
If you have been sleeping heavier than usual, this means you will lay in one position much longer.
There really are no 'hip' exercises since the hips are joints, but there are leg exercises and stretches which may help to alleviate the problem - I would recommend googling 'Leg and Buttock exercises' There are loads of sites. Also try stretching exercises, limberness is a good thing.
Since you are sitting all day long, I would suggest if at all possible to get up more and stand, or just walk around your desk every hour to keep blood flowing and to loosen the muscles.
Again:
1. Try sleeping with a pillow between your knees
2. Try a softer setting on the bed.
3. Leg and Buttock Exercises.
4. Stretching and movement through out the day.
Cheers
David