A 2016 Kentucky case involving a female inmate that appeared in court without pants lands in a court with a sympathetic judge.
This judge epitomizes what most justices do when they face situations like this while on the bench.
However, states, including California, have agencies where judges who are rude, unethical or engage in unprofessional conduct can be reported. In California, it is the Commission on Judicial Performance: https://cjp.ca.gov/
To report judicial misconduct do a Google search using these search words. (Name of the State), judicial misconduct, and file complaint.
To file a complaint against a federal judge for unprofessional conduct go to the United States Court of Federal Claims: https://www.uscfc.uscourts.gov/judicial-misconduct-when-to-file.
Please read the guidelines and rules on the websites when filing complaints against state or federal judges.