Throughout the Old and New Testament God often used dreams to convey a message. Joseph was warned to “take his wife and child to Egypt because Herod is searching for the child to kill him.” This is exactly what Joseph did. They left in the middle of the night and stayed in Egypt until Herod died.
Edgar Allen Poe once said, “Those who dream by day are cognizant of many things which escape those who dream only by night.” Joseph must have been a man who dreamed with God, who was willing to imagine and embrace the radical life which God called him to. Being a father to the Son of God certainly required an extra measure of faith, and Joseph demonstrated his faith in how he didn’t delay moving his family to Egypt while he pondered or calculated; he left immediately. One tends to believe that Joseph’s integrity during his waking moments enabled him to hear and understand God’s thoughts to him while sleeping.