There are two possibilities for rapidly reducing water temperatures. First, the dip tube in your water heater may have broken off. This is a tube that forces incoming water to the bottom of the tank so that hot water will be drawn off of the top. When the dip tube breaks, cold water entering the tank mixes with the hot water and cools it down. This can occur in both gas and electric models.
Second, if your water heater is electric, the lower element that heats the water may not be operating properly, thus only the upper half of the tank will heat up. The cause of this problem could be a bad element or a malfunctioning thermostat. This type of problem should be evaluated by a qualified technician.
Additionally, you may want to check to see if a toilet is leaking. First, check the water level to ensure that water is not overflowing the tank by way of the overflow pipe. This is the pipe in the middle of the tank. It has small tubing connected to it. If water is running into the overflow, adjust the fill valve to stop the flow approximately one inch below the top of the overflow tube or to the water level mark stamped on the side of the tank.
Second, put a few drops of food coloring into the tank to test the flush valve mechanism. If the water in the bowl changes color within 15 minutes, this is an indication that water is leaking into the toilet bowl and that the ball or flapper needs to be replaced.