I found 2 sites offering free and legal downloads of some classic ancient texts in translation, there are some gems in here - #1, University of Chicago:
The Electronic Publications Initiative of the Oriental Institute of the University of Chicago
Publication of research is a central tenet of the mission of the Oriental Institute. Of equal importance is the widespread accessibility of the Institute’s publications to scholars and interested individuals throughout the world. Towards that end, on October 27, 2004, the Oriental Institute established the Electronic Publications Initiative (EPI), by which all publications of the Oriental Institute are simultaneously published both in print and electronically on the Internet, electronic distribution is complimentary.
Rights-Access Restrictions: May not be used for commercial purposes.
Lots of great stuff, here’s the catalogue: https://oi.uchicago.edu/research/catalog-publications
Includes “The Book Of Going Forth By Day” or “Egyptian Book Of The Dead” as it’s better known, here: https://oi.uchicago.edu/research/publications/saoc/saoc-37-book-dead-or-going-forth-day-ideas-ancient-egyptians-concerning
#2: University of Oxford
The Electronic Text Corpus of Sumerian Literature (ETCSL), a project of the University of Oxford, comprises a selection of nearly 400 literary compositions recorded on sources which come from ancient Mesopotamia (modern Iraq) and date to the late third and early second millennia BCE.
The corpus contains Sumerian texts in transliteration, English prose translations and bibliographical information for each composition. The transliterations and the translations can be searched, browsed and read online using the tools of the website.
Source: http://etcsl.orinst.ox.ac.uk/ (links to index of texts available)