Most usual aquarium heaters can be placed diagonally (or horizontally). The problem with placing one vertically is that the heater warms the water, which rises, and the thermostat just sees the newly-warmed water, and therefore cuts off too early, before the warmed water has had a chance to circulate.