Prior to a specific Java version, players can place Rails in their desired direction, but that's not the case with Bedrock Edition. In Bedrock Edition, all Rails can only be placed parallel to the X-axis.
This is considered as a Java Parity and should Mojang implement this, it's up to them.
Thank you for your report!
We're tracking this issue in MCPE-52823, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 BDS Wiki – 📖 FAQs