I've seen numerous feral colonies in cavities in which they must build horizontally rather than vertically and they are doing fine. It is true that most trees are vertical, however, there are definitely situations in which a tree becomes horizontal and a honey bee colony will still take up residence and thrive. To say that they "prefer" to work up and down is reaching...Would it work? At a pinch, yes.
But it is not the way bees prefer to work naturally, they like to work up & down rather than horizontally, remember they evolved in trees.