It seems that one can turn a family of multi-sorted structures:
$\mathcal{M} = \langle \langle M_j \rangle_{j \in J}; \ldots \rangle$
into a single-sorted structure:
$\mathcal{M}_U = \langle \cup_{j \in J} M_j; \langle M_j \rangle_{j \in J}, \ldots \rangle$
But what happens with functions? Suppose I have a function:
$f: M_1 \times M_2 \to M_2$
How do I represent it in the single-sorted structure?
References
Feferman, 1974
More precisely, one turns $\mathcal{M} = \{M_j\}_{j \in J}$ into the set $\coprod\limits_{j \in J} M_j$ (since we don't necessarily know that the $M_j$ are pairwise disjoint).
Hopefully, it's clear that we can take a relation $P \subseteq M_{j_1} \times M_{j_2} \times ... \times M_{j_n}$ and turn it into $P_U \subseteq \mathcal{M}_U^n$ in the obvious way.
For functions, there isn't a nice, natural way to turn a function $M_i \to M_j$ into a function $\mathcal{M}_U \to \mathcal{M}_U$.
However, we can express the function $f$ as a relation $f \subseteq M_1 \times M_2$ and then turn the relation into a relation $f_U \subseteq \mathcal{M}_U^2$.
For your example, we would take a function $f : M_1 \times M_2 \to M_2$, express it as a relation $f \subseteq M_1 \times M_2 \times M_2$, and then construct $f_U \subseteq \mathcal{M}_U^3$.