It's not common (in my experience). I have requested letters of recommendation from professors in a couple of different fields, and was never asked to write my own. Nor have I heard of anyone who was asked to. That said, it might be something that varies by field, institution, culture, etc. I wouldn't rule out it being common in some contexts--I just don't know of any.
It's not unethical. There is not an ethical requirement that a letter from a person was actually written by that person. Even though I've never heard of a student being asked to write their own letter, it is well known that, often, professors don't actually write the letters themselves. Secretarial staff often do much of the actual writing (hopefully with the professor giving input about the student's strong points, things to emphasize, etc). In a broader professional context, it's quite common for people to sign the name at the bottom of letters that were not written by them, for a variety of purposes.
Who wrote the letter, ultimately, doesn't matter. What does matter is that the person signing their name at the bottom agrees with all the content and is willing to stand behind it. As long as your adviser is happy to agree with what you said, there is no ethical problem here.
That said, it's not ideal, either. I would argue that a professor who asks you to write your own letter is not doing a great job discharging their academic responsibilities. Really the content of the letter ought to come from them, even if someone else is writing it up. This is an opportunity for them to assist you in your career, and they aren't really taking that opportunity seriously. In addition, it puts you in a rather awkward situation--many people would not be comfortable putting complimentary words about themselves in someone else's mouth.
So, I sympathize with your situation, it's not great. But you probably don't have a good alternative other than writing the letter as requested, at least from your supervisor. You want a recommendation from your supervisor, and substituting someone else wouldn't be equivalent. At least you get to make sure it says what you want! Just make sure you get someone (who is actually interested in helping you) to review it, both for content and to catch any errors.