If you don’t block any important vents and put things that are resistant to the conditions around the water heater (like potential excessive moisture or heat), then you can put things on top of the water heater.