Atum (creator) was initially Nun (chaos, waters). By self-impregnation, Atum gave birth to 8 deities collectively known as the Ennea. He swallows his own reproductive fluids and generates Shu (goddess of Air) and Tefnut (goddess of moisture), from whom come Nut (goddess of Sky) and Geb (god of earth). Atum took his role as the “eye” of all creation, as the sun-god Re, and they all worked together in a form of “order” called “ma’‘at: the eternal divine order that undergirds all creation.
Re has to travel into the underworld, protected by Seth. Seth defeats Apophis, the god of death, a serpent in the underworld in order to rise up into the ordered world again marking the end of the night. They travel in the underworld by being pulled by night demons (jackals and snakes) of which they have tamed and subjugated.
Further reading: Othmar Keel, The Symbolism of the Biblical World
Motifs such as chaos watery states (Nun), the dome or Hebrew [raqia](רקיע.md) (Nut), day-and-night, and the underworld are all present in Egyptian cosmology.