The important point about this story is that the Church so revered the wonderful Miserere that it kept its score secret so it could only be performed in Rome, so Mozart had no other choice but to memorize it.
Reputably, Mozart had perfect pitch and a phenomenal musical memory and he composed almost without corrections—a look at his handwritten scores and that's obvious, they're neat and near perfect.
Your son is clearly one of those lucky people so gifted.
_
FYI, if interested, here's a YouTube recording of what Mozart wrote down from memory (truly amazing if you ask me): https://www.youtube.com/watch?v=YDOENZediM8