You can get custom foam mattresses made by any number of places on the internet. We got one made from
The Foam Factory for our drop-down bunk.
You can really customize them: multiple layers of different kinds of foam, segmented so you can fold it up, etc.
The one we got was: 2" medium density foam topped with 2" memory foam in a tri-fold configuration. Its the most comfortable bed in the camper! LOL