Read Acts 16:27 Using Other Translations
And the keeper of the prison awaking out of his sleep, and seeing the prison doors open, he drew out his sword, and would have killed himself, supposing that the prisoners had been fled.
When the jailer woke and saw that the prison doors were open, he drew his sword and was about to kill himself, supposing that the prisoners had escaped.
The jailer woke up to see the prison doors wide open. He assumed the prisoners had escaped, so he drew his sword to kill himself.