Sure, many do so every year:
http://www.npr.org/2015/07/27/426742309/the-shock-of-confinement-the-grim-reality-of-suicide-in-jail
[Edit: Yes, I know that jail is short-term confinement whereas prison is long-term. The suicide rate of the latter is lower. Its significance is not.]