When the Magi had gone, an angel of the Lord appeared to Joseph in a dream. “Get up!” he said. “Take the Child and His mother and flee to Egypt. Stay there until I tell you, for Herod is going to search for the Child to kill Him.”
13. And when they had departed How many days elapsed from the departure of the Magi, till Joseph was ordered to flee into Egypt, is not known, nor is it of much importance to inquire: only it is probable that the Lord spared Mary, till she was so far recovered from childbirth as to be able to perform the journey.
We have here Christ's flight into Egypt to avoid the cruelty of Herod, and this was the effect of the wise men's enquiry after him; for, before that, the obscurity he lay in was his protection. It was but little respect (compared with what should have been) that was paid to Christ in his infancy: yet even that, instead of honouring him among his people, did but expose him.
Commenting on Matthew 2:13-15
And when they were departed,.... That is immediately, or as soon as they were gone, or in a very little time after, probably the same night, behold, the Angel of the Lord appeareth to Joseph in a dream; it is very likely the same angel who appeared to him in such sort, Mat 1:20 "saying arise", awake out of sleep, and rise from thy bed...