There were 29 incidents of aggressive sexual behaviour reported in NHS Tayside mental health in-patient and day-patient units last year.
They were among a total of 75 incidents reported in 2017, according to a response to a freedom of information request.
There were also 46 cases of sexual disinhibition – which can range from inappropriate defecation and disrobing to misuse of drugs.
In 2014, there were 13 incidents classed as aggressive sexual behaviour reported and nine of disinhibition.
Figures for such cases reported from January to August this year were 13 and 40 respectively.
The units include Dundee’s Carseview Centre.
An NHS Tayside spokeswoman said: “The increase in the number of incidents being reported is due to several factors.
“Our staff are encouraged to report all incidents, and there are many reporting categories which include an element of sexual behaviour, including those due to drug and alcohol misuse or a patient’s clinical condition.
“Many of the incidents reported are related to patients with cognitive disorders such as dementia, delirium, brain injuries or strokes who may display behaviour of a sexual nature due to their condition.
“There has been an increase in the number of patients being treated for these illnesses as more people admitted to hospital tend to present with more frailty and more than one medical condition.”
The spokeswoman said that staff working in these areas were appropriately trained to deal with these situations, adding: “They understand why people may present certain behaviours related to their conditions.
“Individual care plans are created for patients to manage and minimise the risks associated with such behaviour.”
Bob McGlashan, Tayside senior officer for the Royal College of Nursing, said: “Violence and threats of violence to any hospital staff are completely unacceptable and all health boards have a duty of care to protect staff from attack.
“It should also be made clear that they have a zero tolerance approach to harassment.”