Hello, I find this thread interesting, because I had similar experiences. Even if it's maybe not so topical anymore, I'd like to share my thoughts.
When I was younger at some times the thought of "God" or similar came up. I say "or similar", because that was mostly just a thought, for a moment, then checking, thinking, looking:
Maybe, who knows?
The reason for that thought to come up was always gratitude, just pure gratitude. Who was there to thank for? I think it was a good thing. And I kept looking, what that really is, what that really means, when this came up. Checking my thoughts, what am I making up in my head? - sometimes getting a bit critical with my infatuated thinking. But then usually, not bothering much, just continuing to feel happy about whatever I felt so happy about in the moment and not thinking much about it anymore, just feeling grateful towards whoever, towards whatever. That's how it was most of the time, roughly.
I think it's good to just look at it, to just appreciate it and go along with it, without making anything up, just keeping a clear perspective and developing it. Your experience is your experience. And the best thing to do with it is usually to just experience it as mindfully as possible. Mindfulness is always helpful. So said the Buddha. And there is nothing in the world that is as helpful as understanding just that, even only for a moment. So thank you for giving me the opportunity to think about that.