If your pillow has got wet through flood-damage then you may be able to save it, but in most cases it is safer to throw it away. This is because flood water is generally contaminated with sewerage, meaning that anything that has been soaked by it is now harbouring nasty diseases.
However, if you are sure that it has not been contaminated by sewerage, it can still have been damaged. Depending on what your pillow is made out of, water can damage it in a number of ways.
If you have a feather pillow, then prolonged wetness will have damaged the integrity of the feathers, meaning that they are more likely to clump together, making your formerly comfortable pillow into a lumpy and uncomfortable mess. Not only this, if it doesn’t dry quickly enough, there is a chance that harmful mould will grow within the pillow.
Foam pillows are more resilient, and will more than likely hold their shape, but it is probable that they too will develop mould within them unless they are dried quickly. If mould takes hold within your pillow then you are at risk of getting sick or suffering from breathing trouble.
Your pillow lies right under your head, making it something you need to be sure is safe.