Luke Russell kicked the officer in the small of her back while she was on the floor trying to restrain another prisoner, at 10.30am, on September 11, last year.
Prosecutor Robert Carr said another guard witnessed Russell kicking her “with force and he did it several times.”
“After the incident she was in terrible pain,” he said, adding that she was off work for five weeks and still struggled to walk and sit down two weeks later.
“She has no idea why he assaulted her and she had no way to defend herself,” he said.
Her colleague was left with a broken jaw, and his assailant has been prosecuted, he added.
Chris Perry, mitigating, said Russell accepted kicking the officer once, but CCTV footage of the attack was “not consistent” with more than one blow.
He said Russell was two and a half years through a six-year sentence for attempted robbery, and was due to be released on November 7.
He said Russell had struggled in prison because of schizophrenia and is “desperate to be reunited with his partner.”
“He was on a hiatus with his medication which would make him more unstable,” Mr Perry added.
He said that another inmate had hinted there would be trouble that morning, and Russell “believed he was about to be attacked, but his attack landed on the prison officer.”
He said Russell respected the officer because she had treated him with dignity, and he had written a letter to the court to apologise.
Russell, 25, of HMP Nottingham, admitted assault when he appeared at Mansfield Magistrates Court, on Friday.
Magistrates added two months to his sentence and ordered him to pay £200 compensation. No costs were awarded because of his limited means.