So, yeah, early in the game, there's a coffin on a beach guarded by these two hippo things. When you lay inside it, it closes, when you come out, your gender is switched. I'm not sure if you can continuously use it though, I've only seen it in videos, haven't bothered to go check it out yet.
https://www.youtube.com/watch?v=Y0W5uPP9TFU