As a diver I have had issues with that often. Never found a good answer. What typical has been issue is a build up of wax in the ear canal and water gets behind. Solution is have ears cleaned.
Sometimes a product called swimmers ear can work. It’s just alcohol based. Stuff. It helps evaporate the water I believe. Also prevents infection which I’ve also had. That shit is painful avoid at all costs