Complex sentence: Sometime later, the "wise men" arrived at the house where Jesus and his family were staying, and they fled by night and stayed in Egypt for a while, and returned after Herod the Great died in 4 BC and took up residence in Nazareth.
Split into simpler sentences: Sometime later, the "wise men" arrived at the house where Jesus and his family were staying. They fled by night to Egypt and stayed there for a while; then, after Herod's death in 4 BC, they returned and took up residence in Nazareth.