While you’re probably in the habit of regularly washing your sheets and pillowcases, you might not give as much attention to what lies beneath—your pillows and mattress. But both need a good cleaning at least twice a year.

“Most people do not realize that their pillows can harbor lots of gross and icky things that build up over time—dirt, oils, saliva, sweat, bacteria, mold, and even fungi,” says Michelle Fishberg, CEO and co-founder of Slumbr, a sleep-wellness company. “These things can break down the fill in your pillows, causing them to lose support over time.”

More on Bedding

If you watched CR’s video on how to clean a mattress, we trust that you’ve added that worthy task to your rotation of household chores sure to improve your life.

That just leaves the pillow. “Many sleepers spend hours of time and thousands of dollars finding a great mattress yet often treat their pillow like an afterthought,” Fishberg says.

Here, Consumer Reports shows you how to keep your pillow fresh, clean, and ready for a good night’s sleep.

Step 1: Air It Out

Give your pillows a daily fluffing to restore their shape and remove dust. Then every month or so hang them outdoors on a clothesline for a few hours, ideally on a bright, breezy day, either warm or chilly. If that’s not an option, as with some foam and latex pillows, run them through the dryer on the no-heat cycle.

Step 2: Wash It Gently

Unless your pillow is marked “dry clean only” you should wash most pillows about twice a year following care label instructions. Laundering a pillow isn’t difficult, although it can take a bit of time to get it dry.

If your washing machine is large enough, wash two pillows at a time. That will help balance the load, allowing the water and detergent to circulate more effectively. The agitator on conventional top-loaders can be tough on pillows, so it’s best to agitate on the gentle cycle only for a few minutes (or the shortest possible setting, if you can’t control the specific time). Alternatively, make a special trip to the laundromat to use its front-loaders.

Follow these directions for specific types of pillow fills:

Down or feather. Wash with a small amount of mild powder detergent or a product designed to launder down, on warm and delicate. A liquid detergent that is not completely rinsed out will leave sticky residue, and this causes clumping. So massage the pillow in the detergent solution if you can, to ensure that the down is thoroughly wet. When drying, unless you like the smell of singed feathers, use the no-heat air-dry setting (it will take a while) and dryer balls or tennis balls to break up clumps.

Memory foam or latex. Unfortunately, neither can be washed, nor should they really be steamed, which is generally a good alternative for items that can’t be laundered. The best bet is to spot-treat any stains, preferably as they happen, and to use a pillow cover to extend its life.

Polyester. Wash with warm water on the gentle cycle, preferably a few at a time to balance the load. Be sparing with the detergent. Use about 1 tablespoon of liquid soap.

Buckwheat hulls. Empty the buckwheat filling onto a large cookie sheet or wide, shallow bowl. Set the buckwheat out in the sun, which will eliminate odors, and wash the shell casing using cold water and a mild detergent.

Step 3: Dry It Thoroughly

It’s crucial to get the pillow completely dry—otherwise you risk mildew. Skip the auto-dry setting on your clothes dryer because the sensors will detect only surface moisture, leaving you with a pillow that’s still damp on the inside. Instead, dry the pillow for a good hour on moderate heat. Adding a couple of dry towels will speed things up. Toss in two fresh tennis balls, as well, and they’ll keep the filling from clumping as they bounce around the drum.

If the weather is mild, you can also hang most pillows on the clothesline until they’re dried all the way through. Whichever drying technique you use, you still need to to check for moisture inside the pillow. If none remains, it’s time to make the bed.

We recommend using pillow covers to protect pillows from substances such as sweat, body oils, and face cream. Launder both the pillow cover and the pillowcase regularly, say, once a week, along with your sheets. “You’ll be amazed at how much longer you’ll enjoy the comfort and support of your pillow,” Fishberg says.