Google’s Gary Illyes answered a question on why one might see a sudden spike in indexed URLs by Google Search. The short answer is that there can be a ton of reasons, so it is hard to answer the question without the specific domain.
But Gary did say these three reasons why Google might increase the URLs it indexed on your site from one day to the next. They include:
Google got more hard drives
Google freed up some space
Google newly discovered those URLs
Other reasons, that Gary did not list, may be:
You drastically improved the quality of your site and pages
You fixed a technical issue on your site
You had a super slow site and improved the speed drastically
You improved internal linking
What did I miss?
Here is what that might look like in the page indexing report in Google Search Console (not of this site):
Here is the video where he said this at the 16:04 mark:
Forum discussion at Twitter.