What is the complete sentence or paragraph? I have read that Freud claimed that nightmares are dreams with a sexual content whose libido is transformed into anxiety. The content is generally exempt from any form of distortion and represents the unveiled realization of a repressed desire that has shown itself to be stronger than censorship. The anxiety that accompanies the dream then takes the place of the censorship.
Nightmares can awaken the dreamer, and sleep can be interrupted before the dream's repressed desire has, faced with the censorship, reached its complete realization. In this case there is a failure to form the compromise that constitutes the dream, which then fails to fulfill its function as the guardian of sleep.