How to prevent brake quick release from opening on rough roads?
Presumably the QR lever originally had enough friction to stay closed but has worked loose or a plastic washer or bushing that provided the friction has degraded. Obviously keeping a brake functioning is a high priority 

Probably the simplest solution is to use a bit of tape to hold the lever closed, but tape may come off. Maybe you could use a small zip tie or the type of wire used to stop bolts coming loose.