What can I use for a water supply for my electric hot water heater?
Theoretically, it's possible. Practically, it depends on the size of the pipes, distance, and layout of your plumbing. If the water main is 3/4" and the washing machine is fed by 3/8" lines, you'll lose a lot of flow going out and back. Depending on the type of valve on your shower, it could mean significant temperature swings when a toilet is flushed or another shower is running, or you could see the flow frequently drop to a trickle to avoid freezing you. It could also mean much longer waits before hot water reaches various fixtures.