Twice in my career, I've found myself in senior management roles (CTO in an EMEA organisation, and Software Eng Manager in a medium sized tech company).
In both cases, it's fair to say I wasn't having fun in those roles. I stayed in each for 4-5 years. And in both cases, I left the role to return to a pure coding role (I went freelancing, and eventually ended up as an employee in a company in both cases).
The adjustment was tough. Luckily, I'd been coding in my spare time, so the tech transition wasn't too hard.
But finding myself suddenly in a position of almost zero influence was tough.
I suddenly wasn't setting the agenda. I also found myself disagreeing with my supervisors' decisions but I had to temper my replies (I knew I had more management experience than some of them, but I needed to stay in my box, to a large extent).
In some aspects, it's an ego problem. As a senior manager, you're invariably in a highly visible role, and that brings a certain level of ego boosting.
Also, in my case, there was the various visible attributes that comes with a senior role - company car, personal assistant, international travel, visibility up the org tree, etc.
Luckily, I ended up in a financial trading company so my compenation now is probably where it would be if I had stayed on a management track in other companies.
Do I regret my decisions? At this stage, no (my most recent "reversion" was nearly 7 years ago). I'm happy writing code and not being involved in the politics and BS of management.
But there are times I also miss some aspects of management.
In terms of it being a long-term career choice? I feel it's easier to find roles as a freelance developer than as a freelance manager (or management consultant).