The Interpretation of Dreams by Sigmund Freud Chapter 3 Page 13

psychical apparatus contains two procedures for the construction of thoughts. The second one has the advantage that its products find an open path to consciousness, whilst the activity of the first procedure is unknown to itself, and can only arrive at consciousness through the second one.

At the borderland of these two procedures, where the first passes over into the second, a censorship is established which only passes what pleases it, keeping back everything else. That which is rejected by the censorship is, according to our definition, in a state of repression. Under certain conditions, one of which is the sleeping state, the balance of power between the two procedures is so changed that what is repressed can no longer be kept back. In the sleeping state this may possibly occur through the negligence of the censor;