If you can sew, and have access to a heavy duty sewing machine, then you're on the right track. But it's difficult to find suitable foam. If I could live with a foam mattress, first I'd buy a good memory foam mattress of the right size, then remove the ticking, then cut the foam to the right size pieces, then make custom ticking that would fit tight over the foam pieces.
A "good memory foam mattress" could be anything from a Tempurpedic to a Serta Perfect Elements to a no-name memory foam mattress from your local mattress factory. Or if you have a mattress factory near you, check with them about a source for the memory foam and maybe the ticking.
Note that some foam mattresses are multi-layer, with memory foam on top, different foam in the middle and maybe even a third different foam on the bottom.
Another alternative is to have your mattress made by a custom RV mattress maker. There are several around. Here's one:
Custom Mattress and custom beds