When you're at a lecture and you feel restless, you've got to sublimate the desire to move around. That means you force the desire to be more subtle so you can continue listening — even if you don't want to.
Psychologists use the verb sublimate to describe the process of channeling intense energy into something useful or appropriate. Freud sublimated his desire to live at home with his mother, and he moved into his own apartment. Sublimate is related to the word sublime — both words come from the Latin word sublimare, which means "to raise up" or "to exalt." So Freud's finally getting his own place is, arguably, a superior — a more exalted — living situation.