Can you post some pictures of the plants?
How long is the tank light on for?
What sort of light is on the tank?
Do you use a plant fertiliser (if yes, how often and how much)?
Do you gravel clean the substrate around the plants?
Java Fern should have the rhizome above the substrate. The roots can grow into the substrate but the rhizome should be above it. This is unlikely to be the cause because the plants have been in the tank for a few years, but it is something to check.
Dirty substrate, a sudden change in water chemistry (pH,
GH,
KH) or water quality (ammonia, nitrite, nitrate) can kill plants. Snails can attack plants at night if there is not enough food for the snails.
Check the water chemistry in the tank and tap water. Your water company might have changed their water source or modified what they put in it. You can contact your water company via their website and get a list of what is in the water.
If you have fluorescent light globes above the tank, these can lose colour spectrum over time and that can affect plants. Fluorescent globes should be changed once a year. You should change the fluoro starter for each globe too.
If you have
LED lights, the colour spectrum of these do not change over time and are fine and do not need replacing.