Regarding kipa - in a shiur I heard from R' Nissin Kaplan, he said that if you can't play a sport without taking off your kipa, then you can't play i.e. it's forbidden to remove your kipa for the sake of playing. Swimming he said you could for sure take it off, however he said that the Chazon Ish wore a swim cap in the water.
Regarding modesty in your own home - Shulchan Aruch O.C. 2:2, referring to getting dressed, says that a person should not say "I'm alone in my room and no one sees me" and then sit up without a shirt on (instead of putting the shirt on under the covers - 2:1), because Hashem sees everything. So whatever is inappropriate in public seems to apply in private.