How to properly compute the stable vertical path load factor
Let's look at the extreme case of a 90° pitch attitude. The airplane climbs vertically. Thankfully, in case of an F-16 without loads this is possible (left side of sketch below).

The vertical load factor is defined in the body axis system (blue arrows): $n_z$ is the multiple of gravitational acceleration that presses the pilot into his seat. With $\Theta$ = 90° no gravitational acceleration along the body z axis is left (red arrow), all acts along the body x axis. So here $n_z$ is zero and $n_x$ is -1. Gravitational acceleration presses the pilot into his backrest, but his behind is unloaded.
Since the cosine is 1 for 0° and 0 for 90°, it describes the variation in $n_z$ over pitch. For 180° the cosine becomes -1 and the pilot will hang in his shoulder straps. And so on. The right side of the sketch shows an intermediate case and it should be immediately clear that the component of g in z direction is sin(45°) = 1/√2.
Combine this with the change in $n_z$ for a turn and the formulas
$$n_x = -\frac{sin\Theta}{cos\phi}$$
$$n_z = \frac{cos\Theta}{cos\phi}$$
should make sense. Since the x axis is defined as positive in flight direction, the x component of the load factor is negative with positive pitch attitude, hence the sign of the equation for $n_x$.