I am not aware of anyone like Kapica or Kolmogorov producing their best results in a penal camp.
OTOH we have a notorious railway tunnel in Prague from the 1950s, designed by imprisoned engineers. Guess what, it is half a foot too narrow to put two tracks into. Someone got the last laugh.
Another fun anecdote related to Theremin:
> Theremin invented another listening device called The Thing, hidden in a replica of the Great Seal of the United States carved in wood. In 1945, Soviet school children presented the concealed bug to the U.S. Ambassador as a "gesture of friendship" to the USSR's World War II ally. It hung in the ambassador’s residential office in Moscow and intercepted confidential conversations there during the first seven years of the Cold War, until it was accidentally discovered in 1952.
Interesting life in general: https://en.wikipedia.org/wiki/Leon_Theremin
And yet, we invent things like the cotton gin, "enabling much greater productivity than manual cotton separation", patented in 1794.
Because the efficiency increase in that part of the process meant we could grow so much more cotton to be processed. It wasn't very profitable before that, because slave labor wasn't very efficient at the process.
(This led, eventually, to more automation of the planting/harvesting process.)