It sounds as if you've got an overflow (as opposed to drilled and reef ready). When the electric goes out, your overflow might continue to siphon water out of your display and spill over the sump, causing your flood. If that's the case, then you need to put a siphon break in your overflow U-tube.
If that's not the case, and you do have a siphon break already, then the opposite might be true. When the electric goes out, your pump shuts down and the siphon breaks. However, when the electric comes back on, the return pump fills your display, but the siphon is no longer working and the tank continues to fill until it spills over and floods.
There are SOMEWHAT reliable overflows on the market that can prevent either of the above situations from occuring. I know Lifereef manufactures a very reliable overflow.
swimmer