Note that this movement can take place in both summer and winter conditions. When the Gulf water temperature begins to go outside their comfort range, fish can't simply change their position in the water column. They will often move toward freshwater, which can be warmer in the winter and cooler in the summer. In the winter, they will move onto the flats on sunny days, especially where a dark bottom absorbs the sun's rays and adds to the warming effect. Another comfort factor is safety.
Fish are constantly aware of predators like pelicans, eagles, ospreys, dolphins, larger fish, etc.
Instinctively, they like either some sort of cover, plenty of room to run, or both. Fish on shallow flats seem to know that they are very visible to predators and they are generally quite spooky under these conditions. Seawalls, pilings, rockpiles, oyster piles, dropoffs, sunken logs, etc. Here they are protected overhead by a leafy canopy, to the rear by dry land and on all sides by mangrove roots. The third comfort factor is energy conservation.