The assessment and treatment of an unsuaul pre-sleep ritual are described. The patient had unusual ideas about the probability and consequences of self-harming behaviour in sleep, and averted such behaviour through a ritual with possibly dangerous consequences. The origin and maintaining factors of the ritual are described; a cognitive-behavioural approach was used to treat the ritual, with successful results.