Most electric water heaters have interlocked elements so only one is on at a time. Normally the bottom element does the heavy lifting. However, during times of heavy water use if the top of the tank gets cold the upper thermostat disconnects the lower element and turns on the upper element.
In your case problem could be either thermostat. You could use brute force and replace both or do a little more troubleshooting.
When the top element is off there should be 240 volts at the line side of the lower thermostat. If not the problem is the upper thermostat if lower thermostat has power change it.