This species is common in coastal mangrove forests, particularly near Avicennia marina trees, in western part of the Indian Ocean - Kenya, Tanzania, Mozambique, South Africa and Madagascar.
Juveniles are seldom seen and therefore little is known about their ecology. The adults feed on small organic particles (detritus) and seagrasses that are brought in with the tide. Their habitat is a gently sloping intertidal zone with two high and two low tides each day. There are large differences in the duration of flooding and sea level between the two high tides each day, between seasons and between places nearer to or further from the shoreline.