As the imperfect tenses in verse 5 make clear, Peter’s imprisonment and the early church’s prayer lasted for several days. The story moves to the night before the day on which Herod intended to bring Peter out of prison and take him before the people (verse 4) for trial and summary execution. Luke describes the method of imprisonment in more detail. Peter was handcuffed to a soldier on each side in the prison, and the door was guarded by sentries. During the night – the regular time for such events – an angel of the Lord entered the prison and the place shone with a supernatural light. Peter was asleep, untroubled by the thought of what he expected to happen the next day, and had to be awakened by a nudge on his side. As he stood up, the fetters holding him to the soldiers fell off his hands. Half asleep, he heard the angel tell him to put on his daytime clothing preparatory to leaving the prison. He walked out of the open door of the prison, following the angel and, not unnaturally, thinking that he as dreaming it all. There were three gates to be traversed before Peter reached freedom. The story does not make it clear whether the first two were open or closed, but the implication is that they were open while the guards were sleeping. The third door was the massive outside door of the prison, and it swung open of its own accord, letting Peter and the angel pass out and along the street. Once they had walked away from the immediate vicinity of the prison, the angel disappeared, and Peter realized that he was really and truly free, thanks to divine intervention.
The story is plainly regarded by the narrator as miraculous at every point. It can be argued that it is a legend, especially since several of the motifs in the story can be paralleled from other ancient stories, some of which would have been current knowledge in the first century (5.19, note), and it can be claimed that, in a world of such superstitions, it would be only natural for Christians to believe that their God could do the same kinds of things as other deities. On this view, a story of a release from prison by human agencies may have acquired legendary features in the course of telling. It is impossible to prove the point either way. The person who believes in the reality of the supernatural will not find it difficult to accept this story as it stands, along with other, similar stories in the Bible and Christian history. In this particular instance, there is no element in the story which forbids such a view of it.
From: The Book of Acts: An Introduction and Commentary by I. Howard Marshall; The Tyndale New Testament Commentaries 5, Leon Morris, general editor (Downers Grove: IVP Academic/Nottingham: Inter-Varsity Press, 1980), pp. 208-209. Comment on Acts 12.6-11.
I. Howard Marshall was, at the time of publication, Honorary Research Professor of New Testament at the University of Aberdeen in Aberdeen, Scotland. (I do not endorse his wishy-washy conclusion, by the way.)