I find myself at what I consider to be a milestone in my young adult life. After a year of moving around the country for jobs after college, suffering aches and pains from sleeping on mattresses that weren’t right for me, I’m finally buying a mattress that isn’t a hand-me-down. Mattresses are expensive, so I asked experts for advice on protecting one of my first big investments.

Get a good mattress protector

The first line of defense against wear and tear is a good-quality mattress protector, says Mary Helen Rogers, a spokeswoman at the Better Sleep Council, the consumer education arm of the International Sleep Products Association. Consider your lifestyle and who will be using the bed: Is it a child who might have an accident? Is it a pet owner, or someone who has allergies? Many mattress protectors are hypoallergenic, waterproof or water-resistant, and a good mattress protector is cheaper than replacing a whole mattress.

How to find the perfect mattress for you

Helen Sullivan, a spokeswoman at CertiPur-US, a nonprofit that certifies the foam inside mattresses, recommends something that is quilted and soft on top for the least noticeable option, rather than a loud plastic cover. Once you have a protector, you can add additional layers of comfort and support (and barriers to stains) with toppers and sheets.

Use proper supports, rotate

Although most people don’t remain in one position while they sleep, mattresses can develop dips and depressions over time. Rogers recommends rotating mattresses to ensure even use, which she says helps extend their life.

“Think about the carpet in your living room: If you walk the exact same path to your kitchen for seven years, you’re going to wear out a path in your carpet,” Rogers says. “If you walk in different areas of your carpet, in general it will wear out on a more even and consistent basis.” She says while rotating a foam mattress is important, flipping it over isn’t necessary, because they’re usually constructed to be one-sided, so the bottom layer doesn’t carry the same cushion as the top layer and may be uncomfortable. An innerspring mattress with coils might have a more even construction because it’s protected on all sides and can be rotated and flipped. It’s always a good idea to double-check with the manufacturer to learn how your mattress was made and how to clean and care for it.

Rather than putting a mattress on the floor, where you’ll be more exposed to dirt and have a harder time getting in and out, Rogers recommends placing a mattress on a foundation that corresponds with its size and weight. “If you feel the frame shaking and it feels soft, it’s not supportive enough underneath,” she says. Sullivan says most “beds in a box” don’t require a box spring. Check to see how much weight any bed frame you like can support before buying.

Act quickly on spills

A mattress protector should act as a barrier against most accidents, but in the event it doesn’t, it’s best to act quickly. Brian Sansoni, a spokesman for the American Cleaning Institute, recommends spot-treating by blotting liquids with paper towels and treating with stain remover products. Sullivan also suggests sprinkling a little baking soda on wet stains before blotting with mild soap and cold water.

For more general cleaning, Rogers advises removing covers from mattresses once or twice a year to air everything out. Don’t do this outside, as the mattress might be exposed to allergens. If the mattress is dusty, vacuum gently with a hose attachment. Rogers says to avoid using steam cleaners or carpet cleaners because they could make the mattress too wet. She also recommends laundering mattress covers, bedding, pillows and pajamas frequently.

Store properly

Rogers says mattresses are generally resilient, but it’s a good idea to cover them on both sides with a fitted sheet or in a plastic wrapper while moving. If you need to store the mattress longer-term, Rogers advises buying a waterproof, five-sided encasement that covers the mattress’s tops and sides (it should fit like a pillowcase). Try to store it in a climate-controlled environment (or get as close as you can), as well. Thoroughly inspect the mattress when it’s removed from storage for moisture, mildew and pests.

Replace when you can't sleep

Because your mattress is probably covered by bedding, pads and toppers, obvious signs of wear-and-tear such as frayed fabric or exposed springs may be concealed, so periodically undress your mattress to inspect it. Rogers recommends evaluating your mattress about every seven years for signs of wear, such as noticeable body impressions, lumps, bumps or sagging.

Even if the mattress isn’t in disrepair, your preferences may have changed, and something else could be a better fit. The most telling sign that it’s time for a change is if, like me, you wake up with pain or have trouble sleeping through the night.

“Long before there are visible signs that your mattress is worn out, you’re going to feel physically different, and you’re not going to sleep as well,” Rogers says.

More from Lifestyle:

The 5 best pillows, according to experts

Weighted blankets might ease insomnia and anxiety. Here’s what to know before buying one.

Why mattress shoppers prefer to click a button instead of lie down in person

The household items you need for an updated, grown-up home