Acts 16:27-28
27 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.
28 But Paul cried with a loud voice, saying, Do thyself no harm: for we are all here.
Paul and Silas did not care that they were chained up in prison. They knew that God had put them there for a reason. They got to show that God will set the captive free and were able to lead the prison guard to Jesus. So, know that at the darkest place, God has led you there for a reason.