Two patients smashed up a room at Boston's Pilgrim Hospital after barricading themselves, causing £15,000 of damage, Lincoln Crown Court was told.
John Murphy and John Hunt, both patients in the hospital's psychiatric unit, became difficult with staff in when they were refused their medication after they returned to the unit.
Graham Jones, prosecuting, said that both men were informal patients and not subject to restrictions so were able to leave during the day.
Mr Jones said "When they returned Hunt indicated he had been drinking. Murphy said he had not.
"As a result of drink being taken, medication was not going to be handed out.
"The two of them went into the dining room and things started to take a turn for the worse. They became loud and complained that their needs were not being met."
Staff tried to engage with the two men but then left them alone when that did not work.
Mr Jones said "Once left on their own they decided to barricade themselves in the day room. They barricaded the door with tables and chairs.
"They then proceeded to cause a substantial amount of damage. Staff were of the opinion that they could not manage the situation on their own and called the police.
"Officers arrived to find the doors were barricaded. They tried to talk to the two men who responded with verbal aggression. Negotiators were brought in and after a time they came out of the room and were compliant."
During the incident furniture, air conditioning units and a television were all smashed. A total of £15,000 worth of damage was caused and staff had to evacuate the other 18 patients from the unit. They had to be transported in secure vehicles to other psychiatric units at a cost of £4,000.
Murphy, 35, and Hunt, 27, both of whom were resident at the unit, each admitted a charge of criminal damage as a result of the incident on 16 July this year.
Murphy was jailed for 12 months. Sentence on Hunt was deferred for three months.
David Eager, for Murphy, said he is a vulnerable man who has mental health problems.
He said Murphy was homeless and urged that he be given a custodial sentence which, taking into account the time he has spent in custody, would allow him to be released within a few weeks .
Mr Eager said the extra time in custody would allow arrangements to be made for Murphy to have accommodation on his release from prison rather than be left homeless again.
George Wills, for Hunt, said his client had been allowed bail after a period on remand and has since been receiving treatment for his mental health issues.
"He is living ion a very supportive environment," said Mr Wills.