Mine was doing the same thing. I could be a loose or dirty connection too. I slapped the side of the brake light cover, and it worked again. I have been too lazy to pull off the cover, but it only did it one other time and nothing a slap didn't fix.
Im sure it will short itself out here soon, and I'll just replace the bulb. try a slap to get you by.