I've used expanding foam for most of my models with success. Especially the non-human ones with multi joined legs.
My Mass Effect: Grunt model needed it for similar reasons as your T-Rex, I've cut open the sole of the feet, put a little around the knees with the long pipe that the can came with. Stood it in the correct position, and just waited until it hardens. (needed to hold it for a while so I'd recommend a good audiobook or a movie

)
One thing to look out for is not to use much since it will expand a LOT, and It can "pop" the model.
If the amount is correct there still may be some deformations after it starts to set: i.e. some recesses getting pushed out. It can be pushed back before it hardens completely.
(Also my models generally have more curved surfaces so I cannot say how it will look on a model consisting of flat polygons).
Hope it helps!