If there was a law for doing stupid things online, you would have violated it . . . along with millions of other people, including politicians like Senator Wiener.
Let me paraphrase what you did, to ensure I understand the situation correctly. You went online to a website similar to Chat Roulette. You noticed other people had taken their clothes off. You took your clothes off. You then chose to do what with your naked self? Were you doing more than merely being naked? Perhaps touching yourself inappropriately, because that is what other people may have been doing? Perhaps you felt that appropriate really is just a cultural norm that allowed you to participate in what appeared to be the norm of the online culture you had found yourself in. Where you overwhelmed by the nude possibilities of others exposing themselves to you, such that you then felt peer-pressure for self-pleasure. You then showed yourself, in all your flag waving glory, to any person who may come past. You did not consider how old the viewers may be or who they may be, you just wanted to make yourself available for viewing. As a result, someone, who was under 18 years old, pressed the "report" button on the website, and you were flagged as having solicited a minor for sex.
Now, you have not told us how old you are. That fact does change what you can be charged with. However, you could possibly be charged with any of the following crimes: indecent exposure, child pornography (if you are under 18), solicitation of a minor for sex, public lewdness, a COPPA violation, and numerous other possible crimes.
I admit, when people ask about things like this, I have to ask: If you were in a public park and you took off your clothes and started masturbating at every randomly passing person - including cops, what do you think would happen?
Of course, this all depends on a variety of provable facts. What were you doing, how were you exposing yourself, what were you doing? Can you really be tracked back by your IP address? Can they prove it was you? What was your intent (not that this matters for some of the potential crimes you could be charged with)?
And, do you have a local DA who would really be interested in prosecuting this for you? Would you be of actual interest to the FBI? How many other people on the site would also be reported/ Was this the norm? Is there really a reasonable expectation that people under 18 would even be using the website?
If you are notified that you are being charged with a crime, you will need to hire a good criminal defense attorney. Maybe you could get imaginative and try to claim you were exercising your free speech, but even that will only get you so far as your act may be deemed to be obscenity.
At the end of the day though, you will have to wait and see. In the mean time, I don't recommend visiting such sites, and if you are arrested - be prepared for someone to confiscate your computer. And remember, even if you delete everything off of it, the FBI will still be able to retrieve the deleted files. Thus, I hope you haven't been looking at any illegal images or committed other crimes (copyright violations?). Albeit, a good attorney may be able to help you with a lot of those.
Best of luck! And hire an attorney if you get charged, arrested, or contacted by the government about this!
PS: If you are just joking, I hope you enjoyed the answer.
I am not your attorney. I am providing you an answer for general information purposes only. That information should be used as a starting point for addressing your legal issues. It is not a substitute for a consultation with an attorney licensed to practice in your jurisdiction about your specific legal issues. You should not rely on the information above as legal information. Finally, your question and its answers are not confidential and not subject to attorney-client privilege.