This works, but refer to how capacitors function.
Capacitance is equal to the dielectric constant of the material selected divided by the distance between the conductive area.
A metal foam gives high surface area by utilizing volume, but that extra dimension degrades capacitance.
Electrolyte capacitors resolve this by using non-conductive but ionic compounds to allow the surface area to "feel" as though it is close to the other plate. It's like putting a wire in place that lets voltage potentials propagate but doesn't actually conduct, so you can take that 3d surface area and slap it right against the dielectric to form a capacitor.
The problem is that those electrolytes shear under high voltages and then those split components become conductive, internally shorting your capacitor and kersploding it.