This adoption of Joseph's sons had a reference to the promised blessing. The apostle explains this when he saith, it was by faith. See Hebrews 11:21.
Related Commentaries of Genesis 48:5
Genesis 48:5
5 And now thy two sons, Ephraim and Manasseh, which were born unto thee in the land of Egypt before I came unto thee into Egypt, are mine; as Reuben and Simeon, they shall be mine.