Hello Fredy,
Yes you can stack them vertically, though it may present more of a challenge keeping them hydrated in that orientation. In nature the logs or stumps that stand vertical, and get inoculated by whatever means, still have an extensive
root system, that is in ground contact, to wick water up into the stup/log, through capillary action, which provides adequate moisture to establish the mycelium. How ever you orientate the logs isn't as important, as understanding the dynamics which may effect the substrate hydrology, to maintain optimal mycelium moisture levels in your logs. Maybe have a shallow catch pan under the contact end of the logs, like some turned up visqueen about 1 inch deep, so the water hangs around a little longer, to compensate for any lack of surface area or ground contact, that would naturally increase the hydration potential, from other forms of orientation.
Its all just temperature, moisture, atmosphere exchange, preventing infection and light cycles: if you already have an adequate substrate. Meet those needs as desired by your spacific mycelium, in the required developmental stage, and not many other factors equate to much regarding successful production. Just make sure when fruiting comes, they have room to fruit out, without drastically contorting the fruiting bodies.