The lore was created by Rameau's Nephew and it's kind of a long one, but here it is in shorter terms:
The Dreamer was a little girl who had the power to change reality by her dreams alone. The process was not instantaneous, but such powers made the people of her village dread her to the point of banishing her to an eternal sleep by tying her to a tree that made her sleep forever. She was alone in the dream world and was able to change the flow of it at will. It was just fine for her since she felt like she belonged.
Then Norveg Industries came along with Project Fluxus as Doc Croc wanted to shape reality into their image with something as powerful as a machine that could influence the flow of the dream world. Norveg shut it down as he focused on taking over the world, instead letting the Deedle Ball from An SMWC Production finish it as part of the skeleton crew. He does, and after the Deedle Ball is dealt with (and he lets out an enormous sneeze), the Dreamer starts to stir in her sleep and starts to wake up.
The shape people of the world decide that, having enough of the Dreamer's games and grateful that Norveg Industries' influence on the dream world is gone, decide to ask Mario for a favor to wake the Dreamer up. That's what the last level, awakening, is about: You're awakening the Dreamer. But she gets increasingly agitated with you until she decides that she's done playing games and decides to take her hatred out on Mario, wanting to show him exactly how she felt being treated like garbage in her life.
Also, Magi designed her with not just Cthulhu mythos in mind, but also with angelic motifs (eyes all over their bodies, a halo, etc.)
Come help save Super Mario World Central Production 2 here