While there are some types of rails that have different load ratings dependent on orientation, generally, it doesn't really matter.
Also consider that linear rails can typically handle 10x (or more) the loads that a DIY CNC machine will subject them to.