Likely an air bubble in the M/C found it's way through the fluid port... The engine heat & slight vibration from the engine may have been just enough to cause it to move... That wouldn't cause the light to go out but as soon as you hit the brakes one time now there would be equal hydraulic pressure on both sides of the safety switch so the spool valve would center & the light would go out.... This is why they tell you to bench bleed a master cylinder... It's very hard to push an air bubble out of a master cylinder through the fluid passage & brake lines it can hang in the fluid chamber causing a spongy pedal... It's not uncommon for a bubble to clear itself by floating out through the fluid in the M/C reservoir but it will only do this when the brake pedal is fully up uncovering the passages from the reservoir to the fluid chambers of the M/C...