very common problem. Poor contact between the headlight relay pins and their socket connection.
This tends to cause them to burn out too.
Get a new set of relays if yours are already burnt and ensure when u fit them they are making good contact with the socket (a little bodge / trick) is to bend the pins on the relay slightly so they press up against the side of the sockets better.