The flaps on a glider wing are mainly for shifting the laminar bucket of the wing to the right lift coefficient. Yes, they help to increase maximum lift, too, but for gliding this is less relevant.
The goal in glider flying is to get in the shortest time from A to B. This can be achieved by flying faster than the best glide speed, because it gives the pilot more time to climb up in the next thermal. The stronger the thermal, the faster the optimum glide speed. You can read a great discussion about the finer points of this speed-to-fly theory here, courtesy of John Cochrane.
A fixed airfoil needs to have a wide laminar bucket, so drag can be minimised both when gliding and thermalling. This, however, will result in a less deep bucket which means that the drag coefficient within the bucket is higher than for a flap airfoil with optimum flap setting. Since adjusting the flap allows one to shift the laminar bucket to the desired lift coefficient, the laminar bucket of a flap airfoil can be made narrower and deeper.
The direct answer to your question is: no, negative flaps do not increase the maximum glide ratio but help to fly fast at low airfoil drag. If you look at the L/D at high speed / low lift coefficients, then yes, negative flaps improve the L/D at that part of the polar. They also help to limit the maximum lift a wing can produce and allow to fly faster in gusty weather.
Positive flaps reduce both drag at high lift coefficients and sink rate, and they are essential to reach the polar point of minimum sink in high performance gliders because that optimum is at very high lift coefficients due to the high aspect ratio of the wings. If you fly fast with positive flaps you will greatly increase drag and the sink rate, however.