All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
It is not permissible for you to perform prayer in this condition mentioned in the question for two reasons:
First, praying according to this condition makes one unable to fulfill the pillars of prayer in the legally prescribed way and violating any of the pillars of prayer without a legal and valid excuse invalidates it.
Second, the condition you are in (i.e. swimming) is merely for amusement and cannot be considered a legal and valid excuse which can be permitted in the prayer.
Accordingly, you must go out to the coast to perform prayer on land. Also, we would like to draw your attention to the fact that time is one of the greatest blessings and thus you have to use it in what is beneficial for your religion and worldly life. Ibn ‘Abbaas narrated that the Prophet, sallallaahu ‘alayhi wa sallam, said: “There are two blessings which many people do not make the most of and thus lose out: good health and free time.” [Al-Bukhari]
Although this type of sport is allowed in principle, legal standards and guidelines should be observed in practicing it. Amongst these standards are not to let yourself be distracted from what is more important than it.