Thanks for writing in to Healthcare Magic!
You seem to be having some neurological problem as a cause for your symptoms unless proven otherwise.
The long standing pain in right thigh indicates a serious local cause affecting the hip/spine.
It can be a sciatica
or disc prolapse
You should get a thorough physical and neurological examination by a neurologist
and get investigated to point out the exact diagnosis.
You would need CT/MRI
spine as suggested after the examination and follow the advise accordingly.
meanwhile you should avoid awkward postures, should use a hard bed for lying down, use local pain killer spray like one containing diclofenac
If you have any further query please let me know I would try to answer it for you.
Wish you a great health!