Probably something ABS related, intermittent electrical fault. The ABS system should not do anything under normal braking, it should not pump up or release pressure. Sounds like it may be releasing pressure.
If it were a bad master it would just be bad and should have consistent symptoms. There should be fluid on the carpet under the pedal too.