Solomon
Ecclesiastes 4:14ESV·traditional attribution

For he went from prison to the throne, though in his own kingdom he had been born poor.

Matthew Henry Presbyterian @wholebiblehenry

Solomon was himself a king, and therefore may be allowed to speak more freely than another concerning the vanity of kingly state and dignity, which he shows here to be an uncertain thing; he had before said so (Pro 27:24, The crown doth not endure to every generation), and his son found it so. Nothing is more slippery than the highest post of honour without wisdom and the people's love.

Commenting on Ecclesiastes 4:13-16

John Gill Reformed Baptist @doctorgill

For out of prison he cometh to reign,.... That is, this is sometimes the case of a poor and wise child; he rises out of a low, mean, abject, obscure state and condition, to the highest dignity; from a prison house, or a place where servants are, to sit among princes, and even to have the supreme authority: so Joseph, to whose case Solomon is...

Jamieson-Fausset-Brown Reformed @jfbcommentary

out of prison--Solomon uses this phrase of a supposed case; for example, Joseph raised from a dungeon to be lord of Egypt. His words are at the same time so framed by the Holy Ghost that they answer virtually to Jeroboam, who fled to escape a "prison" and death from Solomon, to Shishak of Egypt (Kg1 11:40).