I can only speak for Canadian prisons, but I suspect that American ones are similar.
The inmates get canteen. In canteen they are able to but pretty much everything you or I can buy. Tuna, etc.
Then you have thier meals which are balanced and better than ,most of them get on the street. Then you have "muscling" which is taking what you want from weaker cons. Also, you have simple theft. If an inmate works in the kitchen, they're set.
Finally, the dieticians and healthcare give out Ensure to some inmates with "stomach problems". The inmates use these like a protien shake and down a couple at a time.
As for weights, they can use pretty much anything. But they do have a pretty good gym to start off with. If for some reason they can't get to the gym (ie segregation), they make weights using plastic garbage bags filled with water.
And let's face it. these guys sit around all day sleeping and resting. They workout for a few hours and that's about all they do. Where you and I actually have responsibilites, these idiots get to sit around all day and do nothing, so they can grow some quality muscle quite easily.
Finally there is the motivation factor. It's not like on the street where guys work out to look good. If you don't want to be taken advantage of in prison, you better get in some kind of shape.
Thus ends my lesson on prison diet and culture.......thank you