Mattress goes back through Middle English materas and Anglo-French to Medieval Latin materacium. The Arabic ancestor maṭraḥ means a place where something is thrown.
The source also records Anglo-French between Medieval Latin and Middle English; its unspecified spelling is omitted, not a claim of direct Latin borrowing.
Sources
- Merriam-Webster: mattress
Word History gives the selected forms, the Anglo-French intermediary and the Arabic meaning.
- Online Etymology Dictionary · mattress
Meanings of the older forms on the word path.
- logeion.uchicago.edu · materacium
Meanings of the older forms on the word path.