How do you feel when you wake up in the morning?

Do you wake up with an aching back? With pain in your neck? Or an acute need for high-strength coffee? How you feel the second your alarm goes off tells you legions about how well you slept. And the underlying cause of your sleep issues could be literally lying under you: your mattress is the foundation to a good night’s rest.

“One of the big problems with sleep is that we underestimate the importance of getting eight quality hours,” says Dr Rangan Chatterjee, M&S sleep ambassador and author of The Stress Solution. “Once you prioritise your sleep, it automatically improves.” Sleep is fundamental to how we feel in the day. If you look in the brain after a bad night’s sleep, says Chatterjee, “you see a collapse in memory, attention, cognitive function, decision-making capacity and the ability to learn new things.” And an increased likelihood of exploding when there’s an unexpected item in the bagging area at the supermarket, because a bad night’s sleep is synonymous with a bad mood.

Admittedly, we all have a few big nights out and accidental midnight Netflix binges, but sometimes we’re unable to sleep well through the night at no fault of our own. And a common culprit? That old mattress you’ve been making do with. “When your mattress is so comfortable that you can’t wait to get into bed in the evening, you send a powerful message to your body and brain,” says Chatterjee. Think of finding the right mattress as an act of self-care, up there with going to yoga or cooking a healthy dinner.

So, how do you feel when you wake up in the morning? If, like 97% of us, you’re tired most of the time, it’s likely that you’re not getting enough quality or quantity of sleep. “The main reason you’re not sleeping well is discomfort: when we’re not physically comfortable, it’s hard to mentally relax,” says Chatterjee. To set yourself up for a better sleep, he recommends choosing the biggest bed you can fit in your room and, before you buy, lying on it for approximately 20 minutes. “Sitting down tentatively in the shop isn’t going to cut it,” he says. Super-firm mattresses tend to be best if you’re a back sleeper or have back pain. The longer you lie on it, the more relaxed and comfortable you’ll feel.

Waking up covered in sweat isn’t necessarily a symptom of nightmares. The answer is more practical than that, says Chatterjee: “Being physically hot at night will wake you up. Being cool is critical to good sleep, so keep your bedroom at a cool, well-ventilated 17C.” If keeping the window open isn’t an option, or you’re still overheating, treat yourself to a cooling mattress topper or a luxury mattress with thermoregulating properties.

Related: Quiz: what’s your sleep personality?

If you often wake up feeling stiff, a memory foam mattress can feel like a miracle. The material is also supportive if you’re tossing and turning, or you have joint problems. “For some people, memory foam can be absolutely life-changing,” says Chatterjee. “The material adapts to your weight and body shape, so it’s very personalised.” As your body sinks into the mattress, you may even feel your spine start to stretch out. It’s the restorative antidote to hunching over a desk during the day.

If you’re prone to waking up with a stuffy nose and sore eyes, it could be that your mattress is just plain old (hello, dust mites) and that a restless night has weakened your immune system. “If you’re sleep deprived and only manage to get four or five hours’ kip, your natural killer cells go down by 70%, which means you’re far more likely to catch viruses,” says Chatterjee. “Investing in quality sleep is the best thing you can do for your immune system.” To be on the safe side, look for a mattress made with natural materials, or add an anti-allergy mattress protector.

So how do you know you’ve found the right mattress? Simple, says Chatterjee: “When you lie down and you don’t want to get up.” Sweet dreams.

The mattress matchmaker

If you wake up feeling achy:
Try the Memory Foam 1500 mattress (from £699). It adjusts to the shape of your body, helps maintain good posture and relieves pressure points.

If you want extra support:
Opt for the Ortho mattress (from £549). It’s made with a firm blend of natural fillings, foam and extra-supportive pocket springs. Result: a firm “yes” for back sleepers.

Want something softer?
Go for the Pillow Top mattress (from £699). It’s a sprung mattress with a snuggly pillow top layer, and contains a bed of mini springs that give superior softness.

The natural option:
Made using cashmere, silk, pashmina, lambswool and cotton, the Natural Plus mattress (from £349) is a pocket spring mattress with an enhanced natural and supportive feel.

The M&S Sleep Shop has everything you need for a great night’s sleep. To find out more, go to marksandspencer.com/l/the-sleep-shop or visit a Sleep Shop in your local store