Edit: Re-reading I realise you were reading that as me thinking the books weren't written in Latin, whereas I was trying to get the parent poster to think a bit beyond "the books were written in Latin" to wonder why they might be written in Latin long, long after the fall of the Roman Empire.
Newton wrote in Latin because he was, famously, an arrogent bellend. The rest of the sensible scientific community had long since swiched to living langauges.
Newton also wrote Opticks in English, perhaps because he was aiming at a more mass market audience.
"Leibniz wrote mainly in three languages: scholastic Latin, French and German."
https://en.wikipedia.org/wiki/Gottfried_Wilhelm_Leibniz
"Many of his writings were in Latin"