There are two possibilities I can think of - a cable problem, or (as mentioned above) the hinged arm on the brake where the noodle plugs in is damaged and allowing the noodle to pop out. I think it is more likely to be the second one - a lot of brakes and setups make it very difficult for the noodle to pop out intentionally, so it happening accidentally is unlikely with an undamaged hinged arm. Can you post a photo?