The first two verses are talking about the end of the Philadelphian era of the church of God.
Isa 57:1 The righteous perishes, And no man takes it to heart; Merciful men are taken away, While no one considers That the righteous is taken away from evil.
Isa 57:2 He shall enter into peace; They shall rest in their beds, Each one walking in his uprightness.
Rev 3:10 Because you have kept My command to persevere, I also will keep you from the hour of trial which shall come upon the whole world, to test those who dwell on the earth.
Rev 3:11 Behold, I am coming quickly! Hold fast what you have, that no one may take your crown.
The chapter then describes a spirit being who has been a long time righteous, and then turned bad. It will become obvious that the being is King Solomon.
He is a child of evil, and perverted spiritual parents. The description starts with this person when he has turned bad.
Isa 57:3 "But come here, You sons of the sorceress, You offspring of the adulterer and the harlot!
Isa 57:4 Whom do you ridicule? Against whom do you make a wide mouth And stick out the tongue? Are you not children of transgression, Offspring of falsehood,
The abovementioned being is a son of the devil. A seed of the liar.
Joh 8:44 You are of your father the devil, and the desires of your father you want to do. He was a murderer from the beginning, and does not stand in the truth, because there is no truth in him. When he speaks a lie, he speaks from his own resources, for he is a liar and the father of it.
The first half of the next verse is describing idol worship, and also could well be describing homosexual sex with the evil sons of God. The word translated ‘idols’ should be translated ‘Gods.’
Isa 57:5 Inflaming yourselves with gods under every green tree, Slaying the children in the valleys, Under the clefts of the rocks?
The second half is describing the sacrifice of children to strange gods.
Molech was one of the pagan gods that Solomon worshipped. Children were burnt as a sacrifice to molech.
1Ki 11:7 Then Solomon built a high place for Chemosh the abomination of Moab, on the hill that is east of Jerusalem, and for Molech the abomination of the people of Ammon.
Jer 32:35 And they built the high places of Baal which are in the Valley of the Son of Hinnom, to cause their sons and their daughters to pass through the fire to Molech, which I did not command them, nor did it come into My mind that they should do this abomination, to cause Judah to sin.'
The smooth stream was Solomon's lot, he refused it just as the Israelites did later on.
Isa 57:6 Among the smooth stones of the stream Is your portion; They, they, are your lot! Even to them you have poured a drink offering, You have offered a grain offering. Should I receive comfort in these?
Isa 8:6 "Inasmuch as these people refused The waters of Shiloah that flow softly, And rejoice in Rezin and in Remaliah's son;
Solomon took his perversions to heaven.
Isa 57:7 "On a lofty and high mountain You have set your bed; Even there you went up To offer sacrifice.
Solomon increased his perversions.
Isa 57:8 Also behind the doors and their posts You have set up your remembrance; For you have uncovered yourself to those other than Me, And have gone up to them; You have enlarged your bed And made a covenant with them; You have loved their bed, Where you saw their nudity.
It’s not clear who the king is. Solomon's perversions increased, and he debased himself to hell.
Isa 57:9 You went to the king with ointment, And increased your perfumes; You sent your messengers far off, And even descended to Sheol.
Solomon lived by his own choice, which was rejecting God. God gave him plenty of time to repent.
Isa 57:10 You are wearied in the length of your way; Yet you did not say, 'There is no hope.' You have found the life of your hand; Therefore you were not grieved.
Isa 57:11 "And of whom have you been afraid, or feared, That you have lied And not remembered Me, Nor taken it to your heart? Is it not because I have held My peace from of old That you do not fear Me?
Solomon’s righteousness is declared in the bible.
Isa 57:12 I will declare your righteousness And your works, For they will not profit you.
Isa 57:13 When you cry out, Let your collection of idols deliver you. But the wind will carry them all away, A breath will take them. But he who puts his trust in Me shall possess the land, And shall inherit My holy mountain."
Isa 57:14 And one shall say, "Heap it up! Heap it up! Prepare the way, Take the stumbling block out of the way of My people."
Isa 57:15 For thus says the High and Lofty One Who inhabits eternity, whose name is Holy: "I dwell in the high and holy place, With him who has a contrite and humble spirit, To revive the spirit of the humble, And to revive the heart of the contrite ones.
Isa 57:16 For I will not contend forever, Nor will I always be angry; For the spirit would fail before Me, And the souls which I have made.
Isa 57:17 For the iniquity of his covetousness I was angry and struck him; I hid and was angry, And he went on backsliding in the way of his heart.
Isa 57:18 I have seen his ways, and will heal him; I will also lead him, And restore comforts to him And to his mourners.
Isa 57:19 "I create the fruit of the lips: Peace, peace to him who is far off and to him who is near," Says the LORD, "And I will heal him."
Isa 57:20 But the wicked are like the troubled sea, When it cannot rest, Whose waters cast up mire and dirt.
Isa 57:21 "There is no peace," Says my God, "for the wicked."