A mattress is a rectangular pad that supports a reclining individual and is used as a bed or part of a bed.
Imprisoned in the mirror universe, the Gabriel Lorca of the prime universe was provided with thin pad to serve as a mattress in his prison cell. This pad was placed over the pre-fabricated bed that was attacked to the cell. (DSC novel: Drastic Measures)
When transporting Starfleet Captain Jean-Luc Picard and Lieutenant Commander Data to Romulus, Captain K'Vada provided a tour of the quarters that the two Starfleet officers would be housed in for the journey. K'Vada pointed out the shelf that served as a bed, and advised that Klingons did not soften their bodies by putting a mattress on the bed. (TNG episode: "Unification")