Urine attracts ticks and wet loin cloths can cause skin damage. Though for the erection part, erections are linked to the parasympathetic nerve system, which is fully active during sleep.(Which is why it's hard for men to get erections when they're chronically stressed)