Paul and Silas could have become cynical when they ended up in prison, and concluded either that God had not been leading them or that he had deceived them. But they knew that God had a plan, and even though they may not have felt like praising him, they do so. God always fulfils his plans, but he fulfils them his way, not ours.