They were praying for Peter as he was in prison and were surprised when they saw him. I think the second but most online resources seem to think the first
This page is a permanent link to the reply below and its nested replies. See all post replies »
The Scripture says the Christians were praying for Peter not for Peter's release from jail. Their reaction to the sudden appearance of Peter is completely normal.