I have a piece of 5" thick foam, (like a piece of seat cushion) that I cut out the shape of two wine bottles. It lays flat in the cupboard with the wine laying flat in it.
I used a razor blade to carve out the shapes so that the bottles sit about half way down in the foam.