I don't think they ever were imprisoned .They were certainly fired from the University of G�ttingen by the King of Hanover for being members of the Die G�ttinger Sieben but they went on to live in Kassel and remained there until they accepted an invitation from the King of Prussia to move to Berlin, where they both received professorships, and were elected members of the Academy of Sciences.