You will also benefit from making a futon frame-type set of slats to lift the foam mattress off the v-berth surface. This allows air to circulate beneath and discourages mould and mildew.
If you're made of money, you can buy this product:
but I figure it wouldn't take a genius to come up with a custom equivalent using tensioned coated wire or just a reworked wooden deck chair.
The only downside to all of these great ideas is you have to put in truly impressive "mattress fiddles".