How could I know that $X^4+1$ is $(X^2+\sqrt 2X+1)(X^2-\sqrt 2X+1)$? I thought that $X^4+1$ was irreducible, but in fact, $$X^4+1=(X^2+\sqrt 2X+1)(X^2-\sqrt 2X+1).$$
In general, how can I have the intuition of such a factorisation if I don't know it ?

There are many good answers already.  Here's a very elementary approach:
Let $f(x) = x^4 + 1$.
Over the real numbers, every polynomial factors into a product of linear and quadratic polynomials.  We know that $f(x) = 0$ has no solutions in the real numbers.  That means $f(x)$ doesn't have any linear factors.
So, it must have only quadratic factors.  Now since $f(x)$ is a polynomial of degree $4$, it must be the product of exactly $2$ quadratic polynomials:
$$
x^4 + 1 = (a_1 x^2 + b_1 x + c_1) (a_2 x^2 + b_2 x + c_2)
$$
From above we know that both factors are quadratic; so their $x^2$ terms are nonzero.  We might as well assume $a_1=1$ (because if not, we can divide by $a_1$ in the first factor, and multiply the second factor by $a_1$).  But then $a_2$ will be $1$ as well, because the $x^4$ term has coefficient $1$.
Similarly, $c_1c_2$ must equal $1$, so $c_2=1/c_1$ (and $c_1\neq 0$).
So let's rewrite the equation, using some new symbols for the coefficients:
$$
x^4 + 1  = (x^2 + ax + b)(x^2 + cx + 1/b)
$$
We do some rearranging:
$$
\begin{eqnarray}
x^4 + 1 & = &(x^2 + ax + b)(x^2 + cx + 1/b)\\
&=& x^4 + ax^3 + bx^2 + cx^3 +acx^2 + bcx + (1/b)x^2 + (a/b)x + 1\\
&=& x^4 + (a+c)(x^3) + (b + ac + 1/b)(x^2) + (bc + a/b)(x) + 1\\
\end{eqnarray}
$$
Since the coefficients on both sides have to be equal, we get three new equations:
$$
\begin{eqnarray}
0& =& a + c\\
0 &=& b + ac + 1/b\\
0& =& bc + a/b
\end{eqnarray}
$$
The first equation says $c = -a$, so let's substitute that into the other two equations:
$$
\begin{eqnarray}
0& =& b - a^2 + 1/b\\
0& = &-ab + a/b\\
\end{eqnarray}
$$
Or, multiplying both sides by $b$ in both equations:
$$
\begin{eqnarray}
a^2b &=& b^2 + 1\\
0& =& -ab^2 + a = a(-b^2 + 1) = a(1+b)(1-b)\\
\end{eqnarray}
$$
The first equation guarantees that $ a\neq 0$, so the second equation now says that $b=\pm 1$.  At this point the first equation says that $\pm a^2 = 2$, so in fact $a^2 = 2$ and $a = \pm \sqrt{2}$.  Now the first equation says $2b=2$, so $b=1$.
Case I: $a=\sqrt{2}$. Then we get
$$
x^4+1 = (x^2 + x\sqrt{2} + 1)(x^2 - x\sqrt{2} + 1)
$$
Case II: $a=-\sqrt{2}$.  Then we get
$$
x^4 + 1 = (x^2 - x\sqrt{2} + 1)(x^2 + x\sqrt{2} + 1)
$$
One case or the other has to be correct, but either way we get the same factorization (just written in a different order).  Therefore that factorization must be correct, and we're done.
