The oldest written text that definitely refers to it is the Dream Stele by Thutmose IV, which describes him having it dug free of sand. The monument was more than a thousand years old at that point.
Young kings showing their piety by restoring old monuments was useful royal propaganda. This wasn't even the last time that the Sphinx was restored.