We exhibit a surprising relationship between elliptic gradient systems of PDEs, multi-marginal MongeKantorovich optimal transport problem, and multivariable Hardy-Littlewood inequalities. We show that the notion of an orientable elliptic system, conjectured in [7] to imply that (in low dimensions) solutions with certain monotonicity properties are essentially 1-dimensional, is equivalent to the definition of a compatible cost function, known to imply uniqueness and structural results for optimal measures to certain Monge-Kantorovich problems [13]. Orientable nonlinearities and compatible cost functions turned out to be also related to submodular functions, which appear in rearrangement inequalities of HardyLittlewood type. We use this equivalence to establish a decoupling result for certain solutions to elliptic PDEs and show that under the orientability condition, the decoupling has additional properties, due to the connection to optimal transport.