before you follow all the advice you will get on fixing modules and wiring harnesses. remove each brake bulb and inspect it closely, you may have a bulb that the filiment broke and then "rewelded" itself together. Also, do not mix bulb manufacturers, I have seen light monitors trip from mixing manufacturer brands more times than I care to say.
Always cover the basics first, The bulb and its socket are the weak link. I usualy replace all the bulbs on the circuit first when cars come in with complaints like this, then proceed if there is still a problem. Ive never had someone complaign about having new bulbs since they are so cheap.