In classical antiquity swimming and bathing were done naked. There are Roman murals which show women playing sports and exercising wearing two-piece suits covering the areas around their breasts and hips in a fashion remarkably similar to the present-day bikini. However, there is no evidence that they were used for swimming. All classical pictures of swimming show nude swimmers.
In various cultural traditions one swims, if not in the nude, in a version in suitable material of a garment or undergarment commonly worn on land, e.g. a loincloth such as the Japanese man’s fundoshi.
In the United Kingdom until the mid-19th century there was no law against nude swimming, and each town was free to make its own laws.