Psychoanalysis refers to the idea of talking about repressed negative emotions and memories to bring them out of the unconscious, making a client feel better (catharsis). Dream analysis is used in psychoanalysis.
The tripartite personality can be attributed to dream analysis, as the ID containing our impulsive desires and drives that may be socially unacceptable.
However, when we are asleep, ego defences are low. This results in us being able to act our unacceptable desires in an acceptable way.