It's about how you are teaching others to treat you.
If you answer those work emails at 11pm, your coworkers and boss will quickly learn that you will make yourself available in the middle of the night. Examine whose expectations you are trying to meet in each situation. Not sure of what’s expected of you in a situation or project? Ask for clear expectations.