In the bathroom it's likely a result of humidity. The only way to prevent that is to coat the blade, be it some type of oil, tuff glide, or wax. Personally, I'd suggest you relocate your razors to...