One of my best friends has done some time. He told me that the kind of prison sex straight men fear and (some) gay men fantasize about only happens in the max-security institutions where a sizable percentage of the population expects to die there -- and even there, not as often as people think.
As for the majority of prisons, as my friend put it, there's gays in prison just like there's gays on the street -- so if you want to fuck a man in prison, you can just find a man who likes to be fucked.
That said, prison is, not surprisingly, a pretty tight ship, and anyone caught fucking can lose good time or get sent to solitary.