An individual's sex, body size and colour pattern can influence its habitat use, and such partitioning can have important ecological and evolutionary consequences. We studied a system very different from those that have attracted previous research on this topic: sea snakes (Emydocephalus annulatus) in shallow-water coral-reef areas of New Caledonia. The snakes used habitats non-randomly in terms of substrate types and water depths, with frequent use of coral-rubble areas that also contained the nests of fish (damselfish and blennies) whose eggs are eaten by these snakes. Mate-searching adult male snakes were found across a broader range of habitat types than were foraging females and juveniles. Smaller snakes were found in shallower water. Colour polymorphism was evident (melanism increased with body size, and was more common in males than in females) but did not affect habitat use. The effects of colour morph on operative temperatures of physical models (evident in terrestrial situations) disappeared under water. Habitat use in this population is affected by a snake's body size and sex, but not by colour. Studies of terrestrial snakes have emphasized thermal or camouflage benefits of colour polymorphism, but the superficially similar polymorphism in E. annulatus is not consistent with either of these hypotheses and thus challenges their generality. Similarly, there was no dietary difference between age or sex groups and thus dietary partitioning cannot explain the observed intraspecific habitat partitioning.