In a 45-45-90 triangle, the lengths of the legs are equal, and the relationship between the legs and the hypotenuse is given by the formula:
\[ \text{Hypotenuse} = \text{Leg} \times \sqrt{2} \]
Let's denote the length of each leg as \( x \).
Given that the hypotenuse is 4 cm, we can set up the equation:
\[ 4 = x \sqrt{2} \]
To solve for \( x \), we divide both sides by \( \sqrt{2} \):
\[ x = \frac{4}{\sqrt{2}} \]
To rationalize the denominator, we multiply the numerator and denominator by \( \sqrt{2} \):
\[ x = \frac{4 \sqrt{2}}{2} = 2 \sqrt{2} \]
Thus, the length of each leg is \( 2 \sqrt{2} \) cm.
Therefore, the correct answer is \( 2 \sqrt{2} \) cm.