Good Question- My first thought was "mitre it are the corner" but then a wide mitre joint is probably going to open with the expansion/contraction of the timber, especially if it's quite wide.
So, I reckon it doesn't matter which way it goes, as long as it looks right when it place. And of course, attach the top in a way which will allow it to move so it doesn't split along the grain!
Hope this is of help,
Warped though it may seem, I tackled this very thing with my first project; 4 L shaped + 5 U shaped (cropped to contour an alcove), with biscuited mitred corners; material was cheap an tres nasty ply edged with mahogany. 3 years on they're still as rough as they ever were, the ony changes being they've darkened with age.
If I were to do it over in solid wood however, I can't say I fancy either option; loking at long grain on one side, with end grain on the other strikes me as being just.....wrong, although Alberto has a valid piont re keeping the grain flowing in the one direction. Even with the pieces of each shelf cut from the same board, a continuously glued mitred joint may fail through slightly unequal rates of expansion / contraction.
When I make up unusual shaped tops for example to fit into a bay window or corner, I usually keep the grain orientated in one direction, usually parallel to the "average". So in this case that would be at 45º.