Hamlet calls Denmark a prison (Act 2, Scene 2):
"Denmark's a prison."
He expands: "A goodly one... in which there are many confines, wards, and dungeons, Denmark being one o' the worst." He feels trapped by Claudius's surveillance, his father's ghost, and his own indecision. The "prison" is both the court and his mind.