Many marine animals are hermaphrodites. Nudibranchs, for instance. It is thought that being able to mate with any same species creature encountered on the reef gives hermaphrodites a better chance of reproducing. 

California Diving News
Many fish, gastropods and plants are sequential hermaphrodites. Instead of having both sexes mature in their bodies at the same time, they start life as one sex and become another later. Protandrous creatures change from male to female. Protogynous creatures change from female to male. According to Wikipedia: “About 75 percent of all sequentially hermaphroditic fish species are protogynous. Common model organisms for this type of sequential hermaphroditism are wrasses.” Other protogynous fish include: Gobiidae (gobies), Lethrinidae (emperors), Pomacanthidae (angelfishes), Scaridae (parrotfishes), some groupers (Epinephelidae) and basses (Serranidae), Sparidae (porgies) and Synbranchidae (swamp eels). There may be more.
California sheephead, like most members of the wrasse (Labridae) family, are protogynous sequential hermaphrodites. 
What triggers a female sheephead to become a male is unknown. It seems likely it is some combination of the fish’s age and how many large males are in its environment. While no one knows precisely how long it takes to change sex, it is probably in the range of a few months. Scientists do know fish can’t reproduce while it is taking place.
Going Through a Phase
Sheephead have three distinctive phases: juvenile phase (JP), initial phase (IP) and terminal phase (TP). Juveniles are less than six inches long and the youngest don’t look like either parent. Older JP fish have their mother’s shape but not her coloring. IP sheephead can range in color from bright red to pink and become paler pink as they age. TP sheephead, i.e., males, are unmistakable. A broad red stripe separates the black head and white chin from the black tail section. These are heavy-bodied fish with a mouth that doesn’t fully close, revealing a few crooked canine teeth. As they age, the bump on their heads becomes larger and the resemblance to their namesake sheep becomes more evident. This is also when they show a remarkable resemblance to various parrotfish, which are close relatives. 
Under ideal conditions, California sheephead can live more than 53 years, grow to be more than three feet long and weigh 40 or more pounds. 
At night sheephead lose their black, white and red coloration, becoming a blotchy red/white. They sleep under ledges and in shallow caves and may even secrete a mucus coating similar to the cocoon that envelops parrotfish when they sleep.
Sheephead spawn between June and September. A male and female do a courtship dance that ends in each releasing gametes, which are fertilized in the water. The fertilized eggs hatch 48 hours later and the larvae drift with the currents before morphing into tiny fish. 
When I was a new diver in the 1970s sheephead were considered a nuisance. They had no fear of divers and were easy to spear, though since few liked the way they tasted only beginners did so unless they were trophy-sized (at that time, 19 pounds was considered big). Try to photograph them and they’d come right in to investigate. Big sheephead were particularly abundant at Cortes Bank, where they got used to hanging out with Mexican abalone divers and eating any scraps they produced until the U.S. claimed the bank as a U.S. territory and asked the ab divers to leave. At Cortes sheephead also followed lobster divers around like puppies, which, as you can imagine, lobster divers did not appreciate it.
And then suddenly (it seemed anyway) sheephead were no longer abundant, victims of overfishing and the desire of the Asian community to choose their restaurant meals from tanks of live, colorful fish. (Sheephead do well in aquariums.) Today, females become males at a much smaller size than they did in the past and trophy-sized males are hard to find in SoCal waters.
I have never seen sheephead digging in sand or sediment for a meal but this is mentioned in several sources, including Dr. Milton Love’s Certainly More than You Want to Know About the Fishes of the Pacific Coast, the source for a lot of the information found here. Dr. Love says that sheephead diet includes crabs, sea urchins, shrimp, barnacles, mollusks, mussels, octopuses, squid, polychaetes, bryozoans, brittle stars, sea cucumbers and even other fish. They, in turn, are preyed upon by giant sea bass, soupfin sharks, Brandt’s cormorants and California sea lions.
California sheephead (Semicossyphus pulcher) are found from Monterey to the Baja Peninsula, Sea of Cortez and Guadalupe Island. They live in intertidal waters down to 295 feet and are one of only three species of wrasse found in SoCal waters. The other two are the rock wrasse (Halichoeres semicinctus) and the señorita (Oxyjulis californica). Rock wrasse undergo the same phases as sheephead and change sex. More research is needed to determine if señoritas are sequential hermaphrodites. According to Dr. Love, these fish “do not appear to change sex.” 
California Sheephead Stats —
Phylum: Chordata
Subphylum: Vertebrata 
Superclass: Gnathostomata
Superclass: Pisces
Class: Actinopterygii
Order: Perciformes 
Family: Labridae 
Genus: Semicossyphus
Species: pulcher 
Shearwater TERN