How did Daniel learn the dream that Nebuchadnezzar had forgotten?
The dream was revealed to Daniel by the sovereign God in a night vision, not through human wisdom or the king's recollection. After Daniel asked the king for time, God disclosed the forgotten dream and its interpretation, demonstrating divine revelation rather than human happenstance.
Les explains that Daniel, still a young man without gray hairs or age-based respect, spoke with counsel and wisdom to Ariok, the captain of the king's guard, who had gone out to slay Babylon's wise men. Daniel asked why the decree was so hasty, and Ariok made the matter known to him. Daniel then went to the king and asked for time, promising to show the interpretation. Les emphasizes that the secret was revealed to Daniel in a night vision because the almighty sovereign God was at work—this was not human happenstance. God revealed to Daniel the dream Nebuchadnezzar had forgotten. When brought before the king and asked if he could make known the dream and its interpretation, Daniel testified that the wise men, astrologers, magicians, and soothsayers could not show it, but there is a God—the God Nebuchadnezzar knew nothing of.
Then was the secret revealed unto Daniel in a night vision. Then Daniel blessed the God of heaven.