next time it happens, try checking your brake light harness. depending on the car, the light is also an indicator that your brake light is either burned or unplugged.
check the contacts and connections..i did that to my girl's old car and it fixed it right up...