Mesopotamia names a civilization rather than a people, and the peoples running through it, Sumerians, Akkadians, Amorites, Kassites, Assyrians and Babylonians, spoke unrelated languages while sharing one written tradition. Cuneiform, developed at Uruk before 3000 BCE for accounting, was adapted first to Sumerian and then to Akkadian, and Sumerian survived as a learned and liturgical language for two thousand years after it ceased to be spoken, much as Latin later did.
The scribal schools are why so much survives. Copying was how the script was taught, so hymns, laments, proverbs, myths and king lists were reproduced across centuries. The Electronic Text Corpus of Sumerian Literature, assembled by Jeremy Black and colleagues at Oxford, makes that body of composition readable in translation, and it is far larger and stranger than the handful of famous epics suggests.
Recovery was a nineteenth century achievement. Excavation at Nineveh, Nimrud and Babylon produced tablets faster than they could be read, and the decipherment of cuneiform opened them. The immediate public impact was religious. The identification in 1872 of a flood account older than Genesis, announced by George Smith to a London audience, forced a reconsideration of the sources of the Bible that has not stopped since.