Tankless hot water heater cycles on without any water running
Tankless water heaters have a flow switch and temperature sensors.  Flow switch activates the water heater when water is flowing and the temperature sensors control the amount of heat delivered.  Perhaps the flow switch is stuck on.