The environmental temperature influences an individual's body temperature, which ultimately affects physiological processes such as growth and metabolism. Lemon sharks, therefore, select warm-water habitats to maintain optimal metabolic levels. They are believed to avoid areas with thick sea grasses because they make finding prey more difficult. Lemon sharks tend to live in or near shallow-water mangroves, which are often the nursery areas of several species of fish. One theory is that lemon sharks select mangrove habitats due to the abundance of prey that resides there, while another theory posits that mangroves provide a safe haven from adult lemon sharks that occasionally feed on juvenile sharks and are unable to enter the shallow waters. Ontogenetic niche shifts, or changes in an animal's niche breadth or position, to deeper waters are known to occur in relation to a lemon shark's size. These changes occur due to the dramatic decrease in the risk of predation as body size increases. Habitat selection clearly depends on a variety of biological and environmental variables.