The Mario, Kirby, and other Nintendo guest stars in Link's Awakening seem a lot less out of place when you realize it's all just a dream.
Even better if you pay close attention to the cameo enemies. Most were from Super Mario Bros. 2, which took place in a dreamworld called Subcon, and Kirby is, well, from Dream Land. It's lighthearted foreshadowing.
At the end of the game, Link wakes up clinging to a log in the middle of the open ocean, with no apparent means of getting anywhere or contacting anyone. Isn't he going to die of exposure, dehydration, and/or sharks?
As has been pointed out many times already, Link wakes to the sound of seagulls flying overhead, implying that he's near the shore.
Besides, the Wind Fish may have given him some assistance.
This troper was describing the plot of the game to a friend, and got as far as When you wake the wind fish, the island ceases to be and OH MY GOD THE WIND FISH IS AZATHOTH. Naturally, this makes the warnings about "waking the dreamer" significantly more sinister.