"Again the voice of the heavenly messenger bids him, “Gird thyself, and bind on thy sandals,” and again Peter mechanically obeys, keeping his wondering gaze riveted upon his visitor and believing himself to be dreaming or in a vision. Once more the angel commands, “Cast thy garment about thee, and follow me.” He moves toward the door, followed by the usually talkative Peter, now dumb from amazement. They step over the guard and reach the heavily bolted door, which of its own accord swings open and closes again immediately, while the guards within and without are motionless at their post. AA 147.1"
"And the angel said unto him, Gird thyself, and bind on thy sandals. And so he did. And he saith unto him, Cast thy garment about thee, and follow me."
This is a clear and direct allusion to Acts 12:8, quoting the angel's instructions to Peter.
"The second door, also guarded within and without, is reached. It opens as did the first, with no creaking of hinges or rattling of iron bolts. They pass through, and it closes again as noiselessly. In the same way they pass through the third gateway and find themselves in the open street. No word is spoken; there is no sound of footsteps. The angel glides on in front, encircled by a light of dazzling brightness, and Peter, bewildered, and still believing himself to be in a dream, follows his deliverer. Thus they pass on through one street, and then, the mission of the angel being accomplished, he suddenly disappears. AA 147.2"
"When they were past the first and the second ward, they came unto the iron gate that leadeth unto the city; which opened to them of his own accord: and they went out, and passed on through one street; and forthwith the angel departed from him."
The EGW passage closely follows the narrative of Acts 12:10, describing the opening of the gates, the passage through the street, and the angel's departure.
"The heavenly light faded away, and Peter felt himself to be in profound darkness; but as his eyes became accustomed to the darkness, it gradually seemed to lessen, and he found himself alone in the silent street, with the cool night air blowing upon his brow. He now realized that he was free, in a familiar part of the city; he recognized the place as one that he had often frequented and had expected to pass on the morrow for the last time. AA 147.3"
"And when Peter was come to himself, he said, Now I know of a surety, that the Lord hath sent his angel, and hath delivered me out of the hand of Herod, and from all the expectation of the people of the Jews."
Both passages describe Peter's realization of his freedom after being miraculously released from prison. EGW provides a more detailed, imaginative account of Peter's experience, but it is clearly based on the biblical narrative.