The particular belief in question here arises from modern LDS scripture (D&C 61) where God says to a group of early LDS missionaries that "there are many dangers upon the waters." These dangers are from Satan being given power over the waters as the world approaches Armageddon, and while faithful LDS missionaries will be preserved while traveling over any water (canal, lake, sea, etc) they're encouraged not to risk it if their faith is not strong enough.
This used to be a pretty common teaching from leadership, but in recent decades it's fallen out of fashion. Missionaries are still forbidden from going swimming at any point during their missions, but usually it's presented as a result of insurance dangers facing unsupervised 18 year olds (which, let's be honest, is an entirely reasonable and accurate concern).
For almost every weird or odd belief you've heard that at least some Mormons believe, there are usually a combination of scriptures and old leadership quotes behind it, but the modern teachings have left them behind with the hope that if these odd teachings are ignored they'll go away (which works out pretty well, for the most part).