The pain described by you is usually a symptom of sciatica. There is some nerve root impingement occuring due to which you are getting this pain. This could be because of maintaining continuous flexed posture like sitting for prolonged hours. This results in causing the disc to impinge the nerve root. Hence causing irritation of nerves and causing the pain in buttocks and thighs.
Next Steps
Please correct your posture if you think it's due to continuous sitting. Please visit the physiotherapist or orthopaedic for detailed evaluation.
Health Tips
Do not put hot packs untill correct diagnosis is reached.