The problem is adding weight that high up would unbalance the boat and put too much stress on the rigging. Also being vertical the amount of power generated would be poor for the cost of the flexible solar panels.
All of the boats I see have several panels on the roof with a wind turbine or two on the transom as they can generate quite a bit of power for their cost.