He turned their heart to hate His people, to deal subtilly with His servants.
In Egypt, the family of Israelites grew to a large and strong nation. The growth of this family scared the Egyptians and God allowed that anger by the Egyptians to grow for His purposes. While this anger led to the slavery of the Israelites, it is another reminder God is working out His plan on His timing for those who trust in Him.
In Numbers chapter 1, the men over the age of 20 years were counted soon after they left Egypt. The total number from that count was 603,550 (see Numbers 1:46). This number excluded one of the 12 tribes of Israel (Levites). If one assumes there were an equal number of women plus children, the total number of people who came of Egypt was between one and two million.
It is amazing to see how God took a small family and turned them into a large nation over a 400-year period of time.
 He sent Moses His servant; and Aaron whom He had chosen.
 They shewed His signs among them, and wonders in the land of Ham.
Between the time when Joseph (great grandson of Abraham) first came to Egypt to the time of Moses, there was roughly a 400-year time gap. Why did God wait so long? The answer was given to Abraham, when he was told the sins of the Canaanites (those who lives in Israel) was not complete and Abraham was told that his descendants would not get the land for another 400 years. (based on Genesis 15:13.)
While the Israelites were suffering in slavery, God was still working out a plan to rescue them from a world that does not honor Him as God. Maybe it took that long (400 plus years) for the Israelites to realize they needed God to be in charge of their lives and not the Egyptians.