Peter was indeed kept in the prison,
but fervent prayer was made by the congregation to Elohim on his behalf
. . .
And, behold!
An angel of YHWH stood by, and a light shone in the building. And striking Peter's side, he raised him up,
saying, Rise up in haste! And the chains fell off from his hands.