any good material shop should sell the mesh stuff needed, then just split the stitching along the top of your headband, feed the mesh in and then run the sewing machine back along the original sewing on the headband, job done!
they use the stuff up the sides of football jerseys for ventilation