Another interpretation of (Exodus 1:8): "Now a new king arose over Egypt." He was the former Pharaoh. It is only that they said to him: "Come, let us join together against this nation." He said to them: "Until now we have been living off what is theirs, and are we to band together against them? Were it not for Joseph, those people would have had no means. And you would band together against them?" He did not listen to them. Immediately they brought him down from his throne for three months. When he saw that they had brought him down, he said to them: "In everything you say, I will obey you." Therefore (Scripture says): "Now a new king arose."
The Pharaoh Who Was Deposed for Three Months in Egypt
Midrash Tanchuma Buber, Shemot 7:2
ד"א ויקם מלך חדש על מצרים. הוא היה פרעה הראשון, אלא שאמרו לו בא ונזדווג לאומה זו, אמר להן עד עכשיו היינו משלהן, ואנו מזדווגין להן, אילולי יוסף לא היו לאותן האנשים ידים, ואתם מזדווגין להן, לא שמע להם, מיד הורידוהו מכסאו שלשה חדשים, כיון שראה שהורידוהו אמר להם כל מה שאתם אומרים אני שומע לכם, לפיכך ויקם מלך חדש.