Matthew 2:19

But when Herod died, an angel of the Lord appeared in a dream to Joseph in Egypt

Matthew 1:20

But while he was thinking of doing this, an angel of the Lord appeared to him in a dream, and said, "Joseph, descendant of David, do not fear to take Mary, your wife, to your home, for it is through the influence of the holy Spirit that she is to become a mother.

Matthew 2:12-13

Then, as they had been divinely warned in a dream not to go back to Herod, they returned to their own country by another way.

Matthew 2:22

But hearing that Archelaus was reigning over Judea in the place of his father, Herod, he was afraid to return there; and being warned in a dream, he took refuge in the region of Galilee,

Treasury of Scripture Knowledge

Summary

But when Herod was dead, behold, an angel of the Lord appeareth in a dream to Joseph in Egypt,

Bible References

An

Matthew 2:13
When they were gone, an angel of the Lord appeared to Joseph in a dream, and said, "Wake up! Take the child and his mother and make your escape to Egypt, and stay there until I tell you to leave. For Herod is going to look for the child in order to make away with him."
Matthew 1:20
But while he was thinking of doing this, an angel of the Lord appeared to him in a dream, and said, "Joseph, descendant of David, do not fear to take Mary, your wife, to your home, for it is through the influence of the holy Spirit that she is to become a mother.