A hotel guest accused of damaging four rooms ran down into the lobby naked and blaming "gypsies" for the attack.
Eamon Devlin is accused of causing thousands of euro of damage to Ballyliffin Lodge Hotel in Co Donegal.
His legal team has blamed an over-the-counter tablet for sparking a psychosis which led to Mr Devlin's "bizarre behaviour". The 41-year-old denies causing criminal damage.
Mr Devlin had booked into the hotel with his three-year-old son as he was going through a divorce at the time of the incident in September 2016 and wanted to spend time with him, Letterkenny Circuit Court heard.
The father and son played pitch and putt at Ballyliffin Golf Club before having a swim and some bar food at the hotel.
Mr Devlin had a pint of Carlsberg, an Irish coffee and took a bottle of wine to his room.
At 11.30pm he ordered another bottle of wine be brought up.
However, at around 5am he arrived in reception naked carrying his son who was in his pyjamas. He asked staff to come to his room, number 214, claiming there were "gypsies" in there and he needed to get them out.
Night porter Seamus Henry went to the room but found there was nobody else there.
At around 6am, the night porter received a phone call from room 215 complaining of shouting in Mr Devlin's room.
Accompanied by another staff member, Mr Henry went upstairs and noticed the corridor was flooded.
They tried to use the master key to enter room 214 but had to force the door as it was damaged.
Mr Henry said the room was under three inches of water and that sinks had been pulled off the bathroom wall and there was broken glass everywhere.
The court was told that the water later spread to three other rooms and at one stage it appeared that the ceiling of one room almost collapsed.
Hotel manager Colm O'Kane said he was phoned at home and arrived a short time later.
He said Mr Devlin asked him: "Did you see them, did you see them? The gypsies? Youse are doing a great job."
Mr Devlin, a marketing manager with a software firm in Northern Ireland, was arrested.
He blamed a combination of stress, medication and alcohol for his behaviour and offered to pay compensation, saying he was deeply ashamed of what had happened.
"I'm a big boy. If that phone call to room service hadn't been made I wouldn't be here," he told gardai.
He said he recalled going into the bathroom but it went dark and he could not find a way out and believed the gypsies were in the room taking his son.
He also said he was taking tablets called Day and Night Nurse for an ear infection.
An expert witness introduced by the defence, Michael Lyons, said the tablets taken by Mr Devlin, of Drumintee Road, Killeavy, Newry, Co Down, contained an ingredient called DXM.
He said that on occasion large quantities of DXM had been shown to lead to psychosis.
However, state prosecutor Ms Patricia McLaughlin said the quantity of tablets was nowhere near that given in the examples outlined by Mr Lyons.
"If he had never consumed this second bottle of wine this would never have happened," she added,
"It has nothing to do with an over-the-counter medication."
Mr Devlin's barrister, Mr Colm Smyth, SC, said his client displayed "a manic strength" to wreck the bathroom which could be caused only by the intake of a substance and not just drink.
Judge John Aylmer adjourned the case until today.