If the LORD appeared to me in a dream at night and said, "Ask something of Me and I will give it to you," I'm not sure what I would say. A hundred million dollars, maybe, or telekinesis.
If I were feeling particularly pious, though, I'd probably say something like, "Whatever is Your will to give me," and feel mighty proud at my humility.
Solomon, as you know, didn't ask for superpowers, or even the life of his enemies. But neither did he try to pull an Ahaz and say, "I will not ask. I will not tempt the LORD." He succumbed to neither false modesty nor false ignorance; he knew he needed an understanding heart to judge God's people and to distinguish right from wrong, and he asked for it.
Notice how Solomon begins his request: "O LORD, my God, you have made me, your servant, king to succeed my father David." Solomon has enough understanding to know that it was God Who made him, "a mere youth," king. God wants him to be king, so it follows that asking for something to help him be a good king is not presumption, but a cooperation in God's plan. Faith and reason come together to make Solomon a co-creator of the history of God's people.
It's a pattern repeated again and again in Scripture, and throughout the history of the Church. We are God's servants, but not His inert and passive tools. There is no virtue in refusing to will anything on our own out of a misguided fear of willing something contrary to God's will. His designs are deeper than ours, but they are not wholly opaque. God has revealed more to us than that He cannot be fully known.
We might compare Solomon's answer to that of St. Thomas, who, according to legend, responded to Jesus' question of, "What should be your reward?," with, "Nothing but You, Lord." Such nonisity would seem to be in contradiction to Solomon's request for a particular useful good. In Solomon's case, though, he was just beginning to serve as king of God's people. St. Thomas, on the other hand, was a few months from death; he was asked, not what gift he wanted, but what reward.
The example of Solomon suggests that we aren't necessarily wholly blind about God's will for us personally, and that we shouldn't be reluctant to ask for what we need to carry it out. At the same time, the example of St. Thomas reminds us of the final end God wills for us, an end which we ought to prefer over all the useful goods we might use on the way.