Pay raises are back in style in the corner office, wiping out cuts from a year earlier and pushing CEO compensation to new highs amid a surging stock market.

Median pay for the chief executives of 104 of the biggest American companies rose 6.8% for fiscal 2016 to $11.5 million, on track to set a postrecession record, according to a Wall Street Journal analysis.

Twice...