Thanks for posting your query.
The pain in your hip has started due to faulty posture against a hard surface.
A soft mattress will relieve you of the pain. Keep the affected hip supported by a pillow- keep a pillow under the thigh to keep the hip joint in neutral position for a rapid recovery.
Loss of libido is mostly due to background problems like uncontrolled diabetes
nutritional deficiencies, work pressure, lack of privacy at home, hormonal
imbalance or some psychological pressure.
These factors are complex and it is needless to say that you should be examined by a local physician and should be investigated to find out the cause.
Hope I have answered your query.
If you have any questions I will be happy to answer.
Wish you a good health.