Basically the Muggles came from the Middle Earth, actual Middle Earth with Gondor and Sauron and the Four Ages, that fourth one being the last. Middle Earth itself was torn apart with the return of Morgoth, who was an acolyte of Nyarlethotep. Eru Iluvatar is actually an Outer God and his realm was once a part of the Dreamlands which he took for himself and bordered off, snatching hominids from Earth in order to create Elves and so on- though the cthonians still gnaw at the roots of this world as they do at ours, Eru's border is more porous than first thought.
Morgoth first met Nyarlethotep whilst exploring the void outside of Eru's realm. The Black Pharaoh was examining the newly arrived minnow at the time but didn't consider direct intervention worth its time, fortunate Eru was allowing parts of itself to wander freely... hence why Morgoth went on to have his own plans and desires, corrupted by his new master.
Anyway Dwarves and Men end up back in our world as the El