Whether or not you can salvage the flattened insulation depends on what kind of insulation it is. If it is fiberglass or rock wool, it can be fluffed back to its original appearance. You can use any garden tool or a large-shaped fork to do the trick. If the insulation is cellulose, you will have to replace it. Cellulose insulation becomes hard when wet, turning into something similar to papier-mâché. The flattened insulation may have blocked some of the vents, so be sure that they are clear of any blockage. While you are at it, check for rotten wood. Lastly, it is very important that you redirect the bathroom exhaust out of the attic and not out the soffits, where the hot moist air can simply rise back into the attic.