As far as I'm aware, the practice started in the days when tar and pitch where in common use, and officers wore gloves to keep their hands clean(er). It was considered bad form to show the dirt when saluting; therefore, the palm down. But only out of custom, not by order. However, there is an "urban legend" that Queen Victoria, when saluted by a junior officer whose gloves were dirty, decreed that naval salutes should, henceforth, be palm down.