Studies in comparative mythology have identified the ancient gods as planets and the thunderbolts that they hurled at each other and at the Earth as plasma discharges.
Since gods are part of the spiritual plane i d suggest to rephrase this a bit.
Planets are part of (ancient) gods.
For example the sun god could be the bright shiny thing. But the ancient and natives have been tribe/clan based. The monkey king could have been the leader of the pack. Or he could have been the avatar of the collective sum of all monkeys.
Sun could be the sun god, or just part of the family of suns and the sun god is the collective sum of all suns.
One prominent feature of gods is that they could be in many places at once or travel huge distances in a second. See greek mythology for examples how gods zap through history.
Then thunderbolts/electricity may be the tools of the planets, but not necessarily have to. There are other ways of influencing matter/energy. In ancient/clan based frameworks the hydrogen in our body is part of all hydrogen in the universe. This is only possible if we accept the "spiritual" dimension. Without it its flatland...