How long has it been in the tank? Have you done any changing around? Is it being bullied by another fish? What about water params?
Sometimes they do this when they are new to a tank, or if things have changed and the territory is different, or stress...