Given the vector equation \( \mathbf{a} \times (\mathbf{b} \times \mathbf{c}) = \frac{\mathbf{b}}{2} \), we apply the vector triple product identity \( \mathbf{a} \times (\mathbf{b} \times \mathbf{c}) = (\mathbf{a} \cdot \mathbf{c}) \mathbf{b} - (\mathbf{a} \cdot \mathbf{b}) \mathbf{c} \). This simplifies the equation to \( (\mathbf{a} \cdot \mathbf{c}) \mathbf{b} - (\mathbf{a} \cdot \mathbf{b}) \mathbf{c} = \frac{\mathbf{b}}{2} \). Since \( \mathbf{a} \) and \( \mathbf{b} \) are unit vectors, we equate the coefficients of \( \mathbf{b} \): \( \mathbf{a} \cdot \mathbf{c} = \frac{1}{2} \). This indicates the angle between \( \mathbf{a} \) and \( \mathbf{c} \) is \( \cos^{-1} \left( \frac{1}{2} \right) = \frac{\pi}{3} \). The equation also implies that the angle between \( \mathbf{a} \) and \( \mathbf{b} \) is \( \frac{\pi}{4} \).
Therefore, the correct answer is \( \frac{\pi}{4} \).