Daniel 2:29 Midrash

אַ֣נְתְּה מַלְכָּ֗א רַעְיוֹנָךְ֙ עַל־מִשְׁכְּבָ֣ךְ סְלִ֔קוּ מָ֛ה דִּ֥י לֶהֱוֵ֖א אַחֲרֵ֣י דְנָ֑ה וְגָלֵ֧א רָזַיָּ֛א הוֹדְעָ֖ךְ מָה־דִ֥י לֶהֱוֵֽא׃

as for thee, O king, thy thoughts came [into thy mind] upon thy bed, what should come to pass hereafter; and He that revealeth secrets hath made known to thee what shall come to pass.

Read midrashic interpretation of Daniel 2:29: and classical rabbinic exegesis.