The ego exists to serve for the survival of the vessel. For this, one can only lessen the impact of the ego, to be rid of it completely would be to transcend the vessel. The ego can become less, and this can be through active meditation as also remaining present in the driving force that can often replace our conscious intentions. Asking “where is this coming from?” serves to consistently remind oneself to presently intend upon their actions, as also to catch the ego in the act of its own venture. You control the vessel, and it will do its best to control you. For this is why laziness operates, for lustful inclinations aspire to destroy you, the ‘monkey’ or egoic mind wishes for a certain lifestyle, and we see those that fall in service of it seem to be poor in health and controlled. For this is why one would do to train the vessel to serve the mind, through exercise, pain, proper nutrition. The servant then becomes humble and within this humbleness, one finds synchronicity. Just as a pet must know its place via the boundaries of its owner, the vessel is just the same.
Meditate.