The following note from the Great Synaxaristes comments on the timeline of when the Magi arrived in Bethlehem:
"The readers should be aware that there exists serious disagreement regarding the time the Magi were supernaturally informed of the nativity and their arrival in Bethlehem. The divine Chrysostom, Theophylact, and Meletios of Athens, together with Justin, Athanasios, and John the Damascene, maintain they venerated the Child in his swaddling clothes in a cave. The divine Epiphanios (Panarion 51 and 52), Jerome, Eusebius (Chronicle), Hippolytus the Theban (Syntagmoi Chroniko), Nikephoros Kallistos (Bk. 1, Ch. 13), Niketas of Serres (Matthew), and other later sources declare that the Magi arrived in Jerusalem some two years after the nativity of the Lord, reasoning that the star appeared to the Magi on the day of the Christ's nativity. Nikodemos, for his part, then asks: 'If the Magi arrived before the presentation in the temple, was not all of Jerusalem in the meantime shaken from Herod's search to murder the Infant? If the Magi found the Christ in the cave, why then does Matthew clearly say that they found the child in a house? If the star appeared to the Magi before the nativity of Christ and they venerated Him in the cave, why should Herod slay two-year-old children rather than newborns?' Nikodemos then concludes that the star appeared on the day of Jesus' birth and the Magi arrived in Jerusalem two years later. Others counter his conclusion, remarking: 'Why then did the Magi venerate Him two years later in Bethlehem, when He and His mother and Joseph were to be found in Nazareth and not Bethlehem?' Nikodemos replies that both Mary and Joseph went yearly, in March-April, to Jerusalem for the Passover, and that it was possible they were visiting Bethlehem also. Afterward, they immediately left for Egypt. Thus the readers are left to make their own inferences from the incomplete evidence."
From The Great Synaxaristes of the Orthodox Church (December) translated by Holy Apostles Convent, p. 1133.