There are a couple of ways to escape the cell in Metal Gear Solid 3 after the torture cutscene. In the first method, go to the 'Cure' menu while viewing Snake and spin him around with the analog stick for a few seconds. When you exit the menu, Snake will throw up, and the guard, Johnny, will come in to check on you. Take him out with the knife and make your escape.
There is an alternative, too. At one point in the torture room, you can look around with L1 and spot the Sorrow holding a sign with a frequency on it. Call that frequency on the Codec to unlock the door. The code is 144.75.