Is it better to vertically or horizontally stack two TV antennas to get stations from opposite directions?
It depends on the polarization of the signal.

If you're unsure about the polarization of the signal, look at the antenna elements of a stationary yagi antenna to see if they're horizontal or vertical. Mobile antenna are often just a single vertical element, so it's not a foolproof way to tell. An internet search would also work. 

TV is horizontally polarized. 

For horizontally polarized signals, vertically on the same mast, spaced at least 1 wavelength apart would be ideal to prevent most signal attenuation.

For vertically polarized signals, use separate masts, spaced at least 1 wavelength apart would be ideal to prevent most signal attenuation.