But at midnight Paul and Silas were praying and singing hymns to God, and the prisoners were listening to them. Suddenly there was a great earthquake, so that the foundations of the prison were shaken; and immediately all the doors were opened and everyone's chains were loosed. [Act 16:25-26]
While Paul and Silas were going throughout the city of Philippi, doing the will of God, they were challenged by a multitude who falsely accused them of starting trouble in their city. As you know the story, Paul and Silas were stripped of their clothing, beaten and thrown in the uttermost part of prison with bonds around their feet.
I would say that being in prison would not be a place that one would find joy, and certainly wouldn’t have the best attitude after being beaten half to death.    But Paul and Silas showed a great example of how to respond to troubles.
These two men, full of the Holy Spirit, had all kind of reasons to complain and blame God for being attacked for doing His work. Instead they found peace in prison, while chained up and suffering from their open wounds. As they sang praises to God, God intervened on their behalf by allowing an earthquake to come and shake loose the prison walls.
Are you in the midnight hour where things are the darkest and you can’t see your way out? Are you in an unpleasant place where bonds have been placed on your life? Perhaps the enemy has stripped you of your dignity, finances, health, job, or even a relationship. Regardless of your situation, stand up boldly and start praising God.
It’s easy to Praise God when everything is going right.  But your true character can only be revealed when you are able to Praise Him in the midst of your circumstances.
As you continue in your Praise to Him, you can be certain that He will act on your behalf, tearing down the walls that have been built around you. He then shall set you free, as well as those that are close to you. “Whom the Son sets free is free indeed!”
Never doubt God in your midnight hour, for He shall give you victory over your enemy and He will put your adversaries to shame.