Should I thank the editor for accepting my paper? My paper has been accepted after several rounds of revisions. The editor him-/herself gave quite detailed comments some of which were quite important. Should I thank him/her personally for the acceptance of the paper and/or his effort(s) (the latter I have done before in my replies to reviews).
I don't see anyone reason why you shouldn't. Although, don't thank them for accepting the paper. A good editor will accept an article by someone they dislike or they wholeheartedly disagree with but which makes a good argument. It's their job. It's not a favor to you personally.

In addition, you can mention it where you acknowledge everybody else who contributed with their comments. It's not uncommon to see papers whose authors thank editors or (anonymous) reviewers for their comments if they went beyond what is ordinarily expected of them.  This seems to be the case here.