Second, he says it respecting the goods which he formerly possessed, for someone might say to him, "If you had not been preserved in this life, you would not have had the goods which you enjoyed in time past." As if to answer this he shows that the preservation of his life should not be desired for the sake of those goods, for even those who have enjoyed an abundance of these great goods throughout their whole lives, end in the same way in death. He means this when he says, "And in my sleep," i.e. death, "I would have been at rest," i.e. I would have been freed from the disturbing things of li...fe, "with kings and counselors of the earth." Note that the intention of those who have a high place in society and seem to prosper greatly, is either to enjoy their pleasures, and as to them he says: "who built solitary dwellings for themselves," (literally: those wanting to be alone to hunt or some other pleasant past-time); or they want to accumulate wealth, and as to them he says, "or with princes who hoard gold and fill their houses with silver." This is as if to say: If I had died immediately after I was born, I would have had nothing less now than those men have after their deaths who prospered in many things. Consider that since rest occurs only in what subsists, he wants us to understand from these words, that man in his soul subsists after death. To the objection that kings and princes of the sort he is describing perhaps do not rest, but experience the torments of the punishments of hell, or even that life was useful to Job himself so that in life he could obtain merit for himself, we must return to what we already said. Job speaks now from the character of the sensual part of the human soul, and expresses what he feels. This part only allows a place for the corporeal goods and evils which are present in the here and now.
Source: Commentary on Job