We'll start with Pythagorean triples to see the pattern. The complete rational solution to $x_1^2+x_2^2 = y_1^2$ has the form,
$$((a^2-b^2)t)^2+(2abt)^2 = ((a^2+b^2)t)^2\tag{1}$$
where $t$ is a scaling factor.
Proof: For any solution where $x_1+y_1 \neq 0$ , one can always find rational {$a,b,t$} using the formulas $a,b,t = x_1+y_1,\; x_2,\; \frac{1}{2(x_1+y_1)}$.
Similarly, for $x_1^2+x_2^2+x_3^2 = y_1^2$, it is,
$$((a^2-b^2-c^2)t)^2+(2abt)^2+(2act)^2 = ((a^2+b^2+c^2)t)^2\tag{2}$$
Proof: One can always find rational {$a,b,c,t$} using $a,b,c,t = x_1+y_1,\; x_2,\; x_3,\; \frac{1}{2(x_1+y_1)}$.
and so on for $n$ squares. See also Sums of Three Squares for more.