This can best be seen in the history of middle earth, his son's chronicle of the writing process for his father's work; volume VI covers the fellowship of the ring, and it is a doozy in first drafts compared to the mainstream published version. He basically tried to reboot Bilbo, and in later drafts his son, going on another quest for dragon gold. It was only after the thing was in full swing that those old impulses and sources found their way into the fabric of the story, sort of figuring out where it was going based on how far he'd wandered in the draft phase.
Anyway he wasn't trying to build english myths when he wrote the books he is famous for, that was more a young & ambitious college student's feverdream.