Yes I had some similar experiences when I was younger. Including waking up in jail, being incoherent, and not even realizing I had been placed under arrest. It's pretty devastating, I know that.
When I get manic it usually lasts for a few months, and I also get psychosis which can be pretty bad. I can be pretty out of it, not knowing what I am doing. One time I had apparently taken handfuls of valium, halcion, and mixed it with a lot of alcohol, not a sui attempt, just an attempt to slow down. I was arrested outside city hall directly across the street from the police station. My "friend" who was with me had decided after I had gone unconscious, to kick the crap out of me. And she did very badly. I woke in a cell and I couldn't see or barley open my eyes. I thought I was having an allergy attack because my eyes were so swollen. In reality I had two massive black eyes. I was finger printed, photographed and interrogated about a crime committed by a different friend. I had charges of theft pressed against me. And the whole time I did not know what was going on. I did not commit that crime however and eventually charges were dropped.
I have been held in jail cells many times by the police when I was younger, most of the time I was very manic and psychotic, usually I was not under the influence of anything. I was tho always accused of being under the influence, and not once did they ever attempt to get me any type of medical assistance or evaluation. Since I was a known street kid to the police, no one was ever notified, sometimes I was held for days on end. I think being a street kid dubbed me a title of "trouble maker".
Another time I had eaten several bottles of ritalin over the coarse of a few days. This led to being arrested for "public nuisance". I had been taking the ritalin trying to get my brain to stop doing what it was doing. Obviously not in my right mind, because who takes that much ritalin who is not trying to sui ?I was very psychotic and I got myself in trouble for causing disturbance thinking that someone was following me and going to kill me. Basically I panicked and tried to get whoever or anyone on the street to help me. Nothing happened as a result.
Sorry I do not have any advice or info for court. I think Blue had good advice. Do you have any representation?
I thought I would share my experience with you, at least know you are not the only one. I know how confusing and scary that it. I am really sorry that happened to you! I hope the judge will clearly see the reality of the situation.