To get the water out, drill a small hole about a foot down from the mast head, right in the front of the mast. The water will dribble out (you can speed this up by blowing into the hole - letting the water squirt out, repeat).

When all the water is out, seal the hole with a dab of Marine-Tex.

Odds are, the water is getting in at the mast head or the halyard latch. Take the masthead off and re-caulk around the metal plate that's on top of the foam sealing plug (use a polysulphide caulk, like Sikaflex or Boatlife). Use silicone caulk to seal the rivets and edges of the halyard latch.