Probably something I'm more likely to learn about as a subject for study rather than a student, but yes I have had a lot of experiences with writing where the book seems to start writing itself, and the relevant knowledge to solve an issue with the story suddenly appears from a random source.
I tend to just blame the characters themselves, but it can't just be that.