Quick answer
You will not get to the bottom of what a king is thinking. The verse measures that against the sky and the ground and says the distance is the same.
Read both lines
The comparison is spatial and deliberately enormous. Height above and depth below are the two directions a person cannot follow, and the saying puts a king's interior in that category. The word is חֵקֶר, searching out, the same root as verse 2, and this is the negative of it: the king whose glory is to search out matters is himself not searchable.
The practical counsel is unstated and unmistakable. Anyone near power who believes he knows what the powerful are thinking is working from a guess. The book has already said the king's heart is in the LORD's hand and gets turned wherever He wishes (21:1), which is the only searching this verse leaves available, and it is not yours.
Related: Proverbs 21:1 · Proverbs 25:2 · Proverbs 20:5 · Proverbs 24:21–22
New King James Version®, Copyright © 1982, Thomas Nelson. All rights reserved. Full copyright information. Scripture provided by API.Bible.
Go Deeper
If this verse has been used to put weight on you that it was never carrying, ask about it directly.