The egg sinks or floats in the sea water depends on the fresh or rotten egg and on the salinity of the water. As the mass decreases and the volume of the egg remains constant means density decreases.