This sort of metaphysical world-building is my bread and butter, whether I'm building my own universe from scratch (as the first step of making an apple pie), or drafting the metaphysical rules behind a modern fantasy setting. (When it comes to laws and rules for magic, I'm a big fan of Brandon Sanderson. He's one of my literary heroes of world-building.) I'm pretty anal about these sorts of things. I think the details really matter and I'm constantly asking "why?" and "what if?". Some of my writer friends hate it, because I always poke at their settings with these questions, but it usually turns out for the best.
For the modern fantasy MS that I'm revising now, I needed supernatural rules that worked as a 'best fit' for as wide a range of myths and legends as possible. But I put a lot of thought into how average, run-of-the-mill people would interpret things, as compared how things actually are. Myths and legends are from the common people, I decided, not those who see behind the "Masquerade," so to speak. It allowed a surprising number of myths from around the world to be condensed into smaller number of "real" creatures that simply were treated a little differently in around the globe, with variations in the local form of the myths (especially re: explanations for how such a creature comes to be) chalked up to local beliefs and customs influencing how the locals interpreted a phenomenon they had no other way of explaining. Actually creating the rules for the "truth" behind it all comes pretty naturally to me, but it's sort of a mix between intuition and logical analysis.
I've rarely intentionally set out to mimic anything I might have seen or read before, but I know that influences come from all over, unconsciously or otherwise.
The two primary types of "magic" in my world are called "necromancy" and "wild magic". These aren't the "original" names for the powers (in times past, they were Chthonic and Supernal, respectively, among others). They have a sort of yin-yang relationship, and both are perfectly natural processes which are required for the universe to keep moving forward. But then there's Eldritch magic, which is loosely inspired by Lovecraft's mythos. And a fourth power that is distinctly human, and will become a huge fact of the books if the series ever ends up complete. I also created various different realms of existence and even came up with multiple models of how those realms might be arranged, to satisfy multiple viewpoints. The two big ones are the "World Tree" model of reality, which describes everything as parts of the Tree of Life, and then there's the Copernican model of reality, which describes everything in concentric orbits/spheres (in my setting, Copernicus was a wizard as well as everything else, though that is just a tangential fact to the series, to add background). Spirits, which are ephemeral creatures of pure thought, also play a huge role in the metaphysics of the setting.
The rules I laid out allowed me to create entirely new things, as well as deal with things in myth. I actually ended up making a game of searching for mythical creatures I hadn't heard of before and seeing how they might fit under my metaphysical framework. It was a learning experience in a hundred different ways.