We consider the quadratic optimization problem \[F_n^{W,h}:= \sup_{x \in S^{n-1}} ( x^T W x/2 + h^T x )\,, \] with \(W\) a (random) matrix and \(h\) a random external field. We study the probabilities of large deviation of \(F_n^{W,h}\) for \(h\) a centered Gaussian vector with i.i.d. entries, both conditioned on \(W\) (a general Wigner matrix), and unconditioned when \(W\) is a GOE matrix. Our results validate (in a certain region) and correct (in another region), the prediction obtained by the mathematically non-rigorous replica method in Y. V. Fyodorov, P. Le Doussal, J. Stat. phys. 154 (2014).