How to update/realign local axis of object after it has been rotated in edit mode?

Hej Patrik. If you want to reset the rotation of the object based on a normal direction in edit mode you could use this method or the one Okidoki mentioned in this thread.

https://blenderartists.org/t/arbitrary-alignment-refresher-course-please/1308819/5

Then you also get the orientation of your object so you can get the same rotation but in object mode instead of edit mode.