Never use treated lumber for stands. First it's not needed second there is always a chance of contaminating your aquarium.I don't think anything you could cover/coat the MDF with will make them waterproof. Water resistant maybe.
I know it's a bit of extra resources, but I'd get a piece of treated or marine grade plywood and cut 48"x24" sections out of it to replace the MDF with.
Even standard plywood once painted stands up to getting wet quite well.