Chris Brown's anger management issues and mood swings stem from bipolar disorder, severe insomnia and Post Traumatic Stress Disorder (PTSD), according to a report from his rehab facility.

New legal documents obtained by reveal:"Mr. Brown became aggressive and acted out physically due to his untreated mental health disorder, severe sleep deprivation, inappropriate self-medicating and untreated PTSD."

The singer appeared in court on Friday for a hearing over his ongoing probation. He was ordered to seek anger management instead of going to to jail when his probation, stemming from his assault on then-girlfriend Rihanna in 2009, was revoked due to an alleged assault on a man in Washington, D.C. in October.

Brown recently completed 95 days in rehab to deal with anger management issues. He stayed an additional five days to ensure he wouldn't relapse.

Brown learned various relaxation exercises and tested negative for drugs during his stay in rehab, according to the documents. "Mr. Brown's attitude has been beyond exemplary in regard to his community service responsibilities," the report stated.

Meanwhile, the judge at Friday's hearing ordered Brown to remain in rehab for another two months. His next hearing is scheduled for April 23.