Get ready for your life to be a whole lot easier.
So long as your bag is made out of canvas or another washable material, it'll be fine going in the washing machine. Just put it in a pillowcase or a laundry bag so the straps and clips don't get stuck or rattle around too much, and wash it in cold water.
Think about how gross our gym bags must get when they're loaded up with sweaty gear every day. Just follow the same process as washing a backpack, but turn it inside out first so you make sure you're targeting the really dirty parts.
If your hat is made of a machine-washable material, then it's good to go in the machine. You can put it in with the rest of your laundry on a cold cycle, and then leave it to dry in the the sun. Stuff it with a towel to make sure it doesn't lose its shape as it dries.
While you probably know that your pillowcases need washing at least once a week, how often are you washing the pillows themselves? It's good to wash them every couple of months to get rid of dust and other gross things that can creep in. While the majority of pillows are safe to go in the machine (except foam ones), make sure to check the tag on your pillow first. Use warm water and put your machine on a gentle, long cycle, with an extra rinse. If you're using a top-loader, put in two at once so it's balanced, and if your pillow is made from down, add a tennis ball to the machine to keep it fluffy. Line-dry in the sun.