Does the whole device need to be submerged, or just the sensor? I suppose that some sort of pressure sensor would be the most reliable way to measure depth, but if you can stand to have some moving parts you could also measure the distance to a float at the surface. For example you could just arrange for the float to pull a string to operate a simple switch. The switch could be under water, or at the surface, whichever was more convenient.