It's ok to store your mattress on its side
Let's be honest here. The best way to store your mattress is flat, covered, and with nothing on it. That said, it's often not always the most practical way, especially if space is limited. So it's good to know it's ok to store your mattress on its side. Particularly if it's for a short time, say less than two months.
Rotate your mattress every now and then
If you're storing your mattress on its side, it's a good idea to rotate it through 180° every couple of months. This is because over time gravity starts to gently affect the springs, glues and foams used in the mattress, causing uneven settling. Rotating your mattress evens everything out and helps keep your mattress in shape.
Create great conditions for mattress storage
This means wrapping your mattress up in a good quality mattress bag, like a Mattibag, and if it's for a long time think about including a couple of large silica gel packets to absorb any moisture (250g packets are adequate) - one for each side of the mattress, inside the bag. The storage environment should be dry, and have adequate ventilation.
Make sure it's properly upright, not leaning
When you're storing your mattress, make sure it's not leaning against a wall at an angle, or worse, with a kink in it. This places uneven pressure on different areas of the mattress and can cause sagging and uneven settling. The best thing to do is find sturdy pieces of furniture or boxes to sandwich your mattress between. If your mattress is in a good quality cover it'll be protected from any dust.
Keep realistic expectations
When it's time to get your mattress out of storage, give it time to settle on the bed before you use it. And keep in mind the longer it's been stored on its side, the more likely it is that the coils or layers of foam have been affected by gravity. It may not feel the same, or offer quite the same kind of support. That said, mattresses today are very well made. So even if there has been some settling, if you've been rotating your mattress it's likely to be ok.