Not sure about Brussels Airport, but after the festival there is a free shuttle back to Leuven station, from there you can get a shuttle bus (18€ I think) to Brussel Zuid station, then you could take a train to the airport, although not sure how early in the morning the first one is, probably around 5 am. Brussel Zuid is also where the Eurostar leaves, maybe that's something to consider too.
Or you can wait at Leuven station till 5 am as well for the first train to Brussels Airport, since your train ticket is included in the ticket for the festival anyway (you'll have to pay a small supplement for the airport though).