Do the scriptures mention about sleeping postures and mattresses?
Regarding sleeping postures I don't know if something is mentioned or not.
But, that one should not sleep with one's head pointed towards either north or west, is mentioned in the scriptures. That means, one is ought to sleep with the head pointing towards either east or the southern direction.
He should not overload his stomach with food ; and having washed his mouth and feet at the close of his evening meal, a house-holder should lie down in a comfortable bed with his head not turned towards the North or the West.
Vyasa Smriti 3.71
Regarding the mattress, as you can see, it simply mentions that the bed should be comfortable.
The above instruction is applicable for the househlders (Grihasta).
For students (Brahmachari), or one who is doing some penance, rule is that they have to sleep on the floor (ground) and not on bed.
Manu Smriti 2.108. Let an Aryan who has been initiated, (daily) offer fuel in the sacred fire, beg food, sleep on the ground and do what is beneficial to this teacher, until (he performs the ceremony of) Samavartana (on returning home)
Note: Sleeping on floor is an austerity (tapasya).
Some further rules are there like one should not sleep in a completely naked state and that one should not sleep during day time as well as during sunrise and sunset times.
4.75. Let him not eat after sunset any (food) containing sesamum grains; let him never sleep naked, nor go anywhere unpurified (after meals).
2.219. A (student) may either shave his head, or wear his hair in braids, or braid one lock on the crown of his head; the sun must never set or rise while he (lies asleep) in the village.