Making metal powders using electrolysis - chosing the right electrolyte
Fine copper powder can be prepared using thermal decomposition of copper citrate (can be prepared by mixing dirt cheap citric acid, three equivalents of a base like potassium hydroxide and copper sulphate). I once made pyrophoric (!) copper powder using this technique. There are mentions of preparation of iron powder same way. Anyway, it is much more practical than electrolysis for big batches. 

Frankly speaking, fine aluminium flakes are widely employed in various paints and are dirt cheap. They should be available in shops for artists. There is no reason to make them at home (and aluminium reacts with water once cleaned of oxide film)

Magnesium is probably the worst. It is quite costly and active and making fine powder is dangerous. It also reacts with water and alcohols, so making it employing electrolysis is out of question. There are mentions of home smelting of aluminium and magnesium, producing magnalium. Magnalium is brittle and can be easily milled, and it is active enough so fine milling is usually not needed. While fancy, proper pyrotechnics can be made without magnesium with easy, aluminium is usually much more preferable. Magnesium often produce huge volumes of white smoke, a habit aluminium doesn't have.

Regardless of above, I strongly encourage to be cautions when working with metal powders, especially magnesium.