If the hearing aids you have are water proof hearing aids then yes you can go swimming with them.
However most hearing aids are not completely water proof and only water resistant to some degree although the most common hearing aids are usually made to resist moisture or the rain but are not meant to be submerged in water.
So you need to make sure you have Water Proof hearing aids and not just water resistant hearing aids to submerge them in water.
Water resistant is where they're made to allow some water onto them but doesn't protect the hearing aids from being submerged in water.
Being waterproof means the hearing aids are made to be submerged into water and can withstand being in the water where water cannot get into the hearing aids.