Verses 20-25 are probably quotations from ancient, eastern poets, all saying that suffering, depression and fear are the direct result of sin. The word translated ‘travaileth with pain’ can mean to dance, to whirl, or to writhe in torment, and may be connected with the pain of childbirth, a pain strong enough to make the body twist.
The conscience of the wicked man witnesses against him and allows him no hope of recovery. He knows that what has happened to him has come from the hand of God and is deserved, and he cannot therefore believe that his circumstances will improve, for in order to believe this, he would have to be stronger than God who punishes him, which he knows he is not. Consequently he is unable to return from darkness, from the calamity that has engulfed him, for his conscience tells him that his guilt is not yet removed and a sword, or some other form of destruction awaits him.