Thanks for your query, I have gone through your query.
The pain and trismus following restoration of the tooth can be because of the disc displacement in the Temporomandibular joint since you are telling you kept your mouth open for long time and they used mouth prop to keep your mouth open. This might have caused damage to the disc in the TMJ.
The other possible cause can be a
wisdom tooth infection. consult a oral physician and get it evaluated.
If it is disc problem, You can take anti inflammatory drugs like piroxicam 20mg twice daily on first day and twice daily on next 6 days. You can also take muscle relaxants like
chlorzoxazone. You can give hot fomentation over the joints. Do not eat hard things, do not open your mouth too wide. take
soft diet.
If it is a wisdom tooth infection then you can take a course of antibiotics like
amoxicillin 500mg and
metronidazole 400mg tid for 5 days (if you are not allergic) and get the tooth removed.
To confirm both of these conditions get a OPG and TMJ view done.
I hope my answer will help you, take care.