If your home employs the conventional tank water heater, odds are it's emptying before it has time to refill and re-heat the water you need. Some other possible reasons that your water heater is running out of water more quickly are sediment buildup, a damaged lower heating element, or a broken dip tube.
Sediment buildup: This is when small amounts of minerals such as calcium or magnesium naturally accumulate in your water heater, displacing the water in the tank. For example, if you have a 40-gallon water heater which has built up 15 gallons of sediment, your water heater is only capable of carrying over 25 gallons of hot water.
Damaged lower heating element: Most electric water heaters have heating elements near the top and bottom. The lower element does most of the heating through conventional currents, so when water is cold it travels to the bottom, heats up, and then rises to the top. For this reason, the top heating element only turns on periodically, so if you notice your hot water isn't consistent, it could be due to a lower heating element issue.
Bad dip tube: The dip tube makes sure that the cold water coming into your tank is pushed to the bottom to be heated. There are two common reasons your dip tube may not be functioning properly. It could need to be replaced due to wear and tear over time, or it could be damaged. Either way, it will need to be repaired or replaced in order to restore total hot water functionality.