[proofplan]
We first verify directly that the displayed formulas produce primitive integer solutions. For the converse, we use sign changes to reduce to $y \geq 0$ and, if necessary, choose the sign of $x$ so that the slope denominator has the required parity, then parametrize rational points on the conic $X^2+2Y^2=1$ by drawing a rational line through the rational base point $(-1,0)$. Finally, we reduce the rational slope to lowest terms and use the parity forced by primitivity to obtain an odd denominator, giving the required integers $m,n$.
[/proofplan]
[step:Verify that the parametrized triples solve the conic equation]
Let $m,n \in \mathbb{Z}$ satisfy $m>0$, $m$ odd, $n \geq 0$, and $\gcd(m,n)=1$. Define integers $x,y,z \in \mathbb{Z}$ by
\begin{align*}
x &= m^2-2n^2,\\
y &= 2mn,\\
z &= m^2+2n^2.
\end{align*}
Then $z>0$, since $m>0$ and $m^2+2n^2>0$. We compute
\begin{align*}
x^2+2y^2
&= (m^2-2n^2)^2+2(2mn)^2\\
&= m^4-4m^2n^2+4n^4+8m^2n^2\\
&= m^4+4m^2n^2+4n^4\\
&= (m^2+2n^2)^2\\
&= z^2.
\end{align*}
Thus every displayed triple satisfies the conic equation.
[/step]
[step:Prove that the parametrized triples are primitive]
Let $d=\gcd(x,y,z)$. Since $m$ is odd, both $m^2-2n^2$ and $m^2+2n^2$ are odd, while $2mn$ is even. Therefore $2 \nmid d$.
Now let $p$ be an odd prime dividing $d$. Then $p$ divides both $x+z$ and $z-x$, so
\begin{align*}
x+z &= 2m^2,\\
z-x &= 4n^2.
\end{align*}
Because $p$ is odd, $p \mid m^2$ and $p \mid n^2$, hence $p \mid m$ and $p \mid n$. This contradicts $\gcd(m,n)=1$. Therefore no prime divides $d$, so $d=1$ and the triple is primitive.
[guided]
We must rule out every possible common prime divisor of $x$, $y$, and $z$. First consider the prime $2$. Since $m$ is odd, $m^2$ is odd. The number $2n^2$ is even, so
\begin{align*}
x=m^2-2n^2
\end{align*}
is odd, and likewise
\begin{align*}
z=m^2+2n^2
\end{align*}
is odd. Hence $2$ cannot divide all of $x,y,z$.
Now let $p$ be an odd prime that divides all three of $x,y,z$. Since $p \mid x$ and $p \mid z$, it divides their sum and difference:
\begin{align*}
x+z &= (m^2-2n^2)+(m^2+2n^2)=2m^2,\\
z-x &= (m^2+2n^2)-(m^2-2n^2)=4n^2.
\end{align*}
Because $p$ is odd, $p \mid 2m^2$ implies $p \mid m^2$, and $p \mid 4n^2$ implies $p \mid n^2$. Since $p$ is prime, this gives $p \mid m$ and $p \mid n$, contradicting $\gcd(m,n)=1$. Therefore no prime divisor of $\gcd(x,y,z)$ exists, so $\gcd(x,y,z)=1$.
[/guided]
[/step]
[step:Reduce a primitive solution to a rational point with controlled signs]
Conversely, let $(x,y,z)\in\mathbb{Z}^3$ be primitive, let $z>0$, and suppose
\begin{align*}
x^2+2y^2=z^2.
\end{align*}
Changing the sign of $y$ does not affect the equation, so assume $y\geq 0$.
If $y=0$, then $x^2=z^2$. Since $z>0$ and $\gcd(x,0,z)=1$, we get $z=1$ and $x=\pm 1$. After possibly replacing $x$ by $-x$, this is
\begin{align*}
(x,y,z)=(1,0,1),
\end{align*}
which is obtained from $m=1$ and $n=0$.
Assume now that $y>0$. Then $x\neq -z$, because $x=-z$ would imply $2y^2=0$. Define rational numbers $X,Y \in \mathbb{Q}$ by
\begin{align*}
X=\frac{x}{z},\qquad Y=\frac{y}{z}.
\end{align*}
Then
\begin{align*}
X^2+2Y^2=1,
\end{align*}
and $X\neq -1$. Define the rational slope $t\in\mathbb{Q}$ by
\begin{align*}
t=\frac{Y}{X+1}.
\end{align*}
Since $y>0$ and $z>0$, we have $Y>0$, and since $X\neq -1$, this is well-defined.
[/step]
[step:Parametrize the rational point by the slope through $(-1,0)$]
The equality $Y=t(X+1)$ and the conic equation give
\begin{align*}
X^2+2t^2(X+1)^2=1.
\end{align*}
Expanding and factoring gives
\begin{align*}
0
&=X^2+2t^2(X+1)^2-1\\
&=(X+1)\bigl((1+2t^2)X+(2t^2-1)\bigr).
\end{align*}
The root $X=-1$ is excluded by the preceding step. Therefore the other factor vanishes, and
\begin{align*}
X=\frac{1-2t^2}{1+2t^2}.
\end{align*}
Substituting this into $Y=t(X+1)$ gives
\begin{align*}
Y
&=t\left(\frac{1-2t^2}{1+2t^2}+1\right)\\
&=\frac{2t}{1+2t^2}.
\end{align*}
[guided]
The slope $t$ records the line through the fixed rational point $(-1,0)$ and the rational point $(X,Y)$, because $Y=t(X+1)$. Substituting this line equation into the conic equation gives
\begin{align*}
X^2+2t^2(X+1)^2=1.
\end{align*}
This is a quadratic equation in $X$. Expanding it:
\begin{align*}
X^2+2t^2(X^2+2X+1)-1
&=(1+2t^2)X^2+4t^2X+(2t^2-1).
\end{align*}
Since the line passes through the known point $(-1,0)$, one root is $X=-1$. Factoring gives
\begin{align*}
(1+2t^2)X^2+4t^2X+(2t^2-1)
=(X+1)\bigl((1+2t^2)X+(2t^2-1)\bigr).
\end{align*}
Our point has $X\neq -1$, so it must satisfy
\begin{align*}
(1+2t^2)X+(2t^2-1)=0.
\end{align*}
Solving for $X$ gives
\begin{align*}
X=\frac{1-2t^2}{1+2t^2}.
\end{align*}
Then the line equation gives
\begin{align*}
Y
=t(X+1)
=t\left(\frac{1-2t^2}{1+2t^2}+1\right)
=\frac{2t}{1+2t^2}.
\end{align*}
[/guided]
[/step]
[step:Recover coprime parameters with odd positive denominator]
Since the solution is primitive, $x$ and $z$ cannot both be even. From
\begin{align*}
z^2-x^2=2y^2
\end{align*}
we see that $x$ and $z$ have the same parity, so both are odd. Reducing the original equation modulo $2$ then gives $y^2\equiv 0\pmod{2}$, hence $y$ is even.
Define integers $A,B\in\mathbb{Z}$ by
\begin{align*}
A=\frac{x+z}{2},\qquad B=\frac{z-x}{2}.
\end{align*}
Then $A+B=z$ and $A-B=x$. If a prime $p$ divides both $A$ and $B$, then $p$ divides $x$ and $z$. The equation $2y^2=z^2-x^2$ then implies $p\mid 2y^2$. For odd $p$, this gives $p\mid y$, contradicting primitivity. For $p=2$, divisibility of both $A$ and $B$ would make $x=A-B$ and $z=A+B$ even, contradicting that $x$ and $z$ are odd. Hence $\gcd(A,B)=1$.
The identity
\begin{align*}
2AB=2\left(\frac{x+z}{2}\right)\left(\frac{z-x}{2}\right)=\frac{z^2-x^2}{2}=y^2
\end{align*}
shows that $2AB$ is a square. Since $\gcd(A,B)=1$, exactly one of $A$ and $B$ is even: they cannot both be even by coprimality, and they cannot both be odd because then $2AB$ would have $2$-adic valuation $1$, not an even valuation as a square must. Therefore one of $A=(x+z)/2$ and $B=(z-x)/2$ is odd.
If $A$ is odd, keep the current sign of $x$. If $A$ is even, replace $x$ by $-x$; this preserves the equation and interchanges $A$ with $B$. After this sign choice, redeclare
\begin{align*}
X=\frac{x}{z},\qquad Y=\frac{y}{z},\qquad t=\frac{Y}{X+1}=\frac{y}{x+z}.
\end{align*}
The denominator $(x+z)/2$ is odd, and since $y$ is even we may write $y=2y_0$ with $y_0\in\mathbb{Z}$. Thus
\begin{align*}
t=\frac{2y_0}{x+z}=\frac{y_0}{(x+z)/2}.
\end{align*}
Writing this rational number in lowest terms as $t=n/m$, with $m>0$, $n\geq 0$, and $\gcd(m,n)=1$, the reduced denominator $m$ divides the odd integer $(x+z)/2$. Hence $m$ is odd. Since $y>0$, we have $t>0$ and therefore $n>0$ in the present case.
Applying the parametrization from the previous step to this redeclared slope gives
\begin{align*}
X=\frac{m^2-2n^2}{m^2+2n^2},\qquad
Y=\frac{2mn}{m^2+2n^2}.
\end{align*}
Multiplying the formulas for $X=x/z$ and $Y=y/z$ by $z$ gives
\begin{align*}
x=\frac{z(m^2-2n^2)}{m^2+2n^2},\qquad
y=\frac{2zmn}{m^2+2n^2}.
\end{align*}
The parametrized triple
\begin{align*}
(m^2-2n^2,\;2mn,\;m^2+2n^2)
\end{align*}
is primitive by the previous step and has the same rational point $(X,Y)$ as $(x,y,z)$. Since both triples are primitive integer triples with positive third coordinate representing the same rational point, they are equal. Hence
\begin{align*}
x=m^2-2n^2,\qquad y=2mn,\qquad z=m^2+2n^2.
\end{align*}
[/step]
[step:Account for the sign ambiguity in the parameters]
Replacing $x$ by $-x$ or $y$ by $-y$ preserves the equation
\begin{align*}
x^2+2y^2=z^2.
\end{align*}
The construction above therefore proves that every primitive solution with $z>0$ is obtained from the displayed parametrization after possibly changing signs of $x$ and $y$.
Finally, replacing $n$ by $-n$ leaves $m^2-2n^2$ and $m^2+2n^2$ unchanged and replaces $2mn$ by $-2mn$. Thus the parameter pairs $(m,n)$ and $(m,-n)$ give the same solution after changing the sign of $y$. This completes the parametrization.
[/step]