use particle board before MDF. particle board is porous which means it will soak it up but will also release it, it will swell but will reduce when it dries out. It won't go back to flat but it will reduce. It is stronger than MDF due to the particles being glued together in a random pattern unlike MDF which is a layered product so it has a grain and will curve and hold its shape. MDF will absorb water like particle board but retain it, go fluffy and start to break down so particle board is the best option of the two.
Ply will perform the best with regard to swelling/rotting etc but i think is overkill, my particle board has been under my tank for what must be a couple of years now and ther'es no swelling i can see and plenty of water gets spread around when doing what changes or chasing trophs with a net.
i spent 8 or 9 years in the kitchen industry and around 5 years of that designing and making kitchens for Housing New Zealand houses, i have seen which works best for abuse and for water damage.