The end is the beginning and the beginning is the end.
From the Egyptian perspective life emerged from death just as death surely followed life and there was no compelling reason to exempt the gods from this cycle. This idea was aided by the fact that the Egyptians two of them would survive when the world eventually reverted to the primeval ocean from which all else arose. Then, it is said, Atum and Osiris would take the form of serpents (symbolic of unformed chaos) and there would be neither gods nor men to perceive them (BD 175). Despite their seemingly endless cycles of birth, ageing, death and rebirth, the gods would finally perish in the death of the cosmos itself, and there would exist only the potential for life and death within the waters of chaos.
Wilkinson, R. H. (2003). The Complete Gods and Goddesses of Ancient Egypt. London: Thames and Hudson., pp. 21-2.