Stewart Ferguson says he could not wait to get out of hospital after spending all night in the A&E department.

He was admitted to the Victoria Hospital in Kirkcaldy, Fife, at 7pm on March 13, 2012, experiencing spasms in his chest.

Over the following 12 hours he received nothing to eat, and when he buzzed for help as the spasms returned no-one rushed to his assistance.

His experience occurred just weeks before Scottish ministers were sent a report warning that 21 out of 24 A&E departments in Scotland were regularly unsafe. The College of Emergency medicine was so concerned about the quality of care available when patients were backed up in A&Es waiting for ward beds, they surveyed staff about the problems and sent their findings to the Scottish Government.

Mr Ferguson, who had had a heart attack in 2008 and was subsequently fitted with a stent – a tube to keep his arteries open – says he was left on a trolley for almost five hours as no beds were available and was warned he might have to stay on the trolley all night.

Just after midnight, he was told a bed had become available in a side ward, but staff still did not take him into the main hospital where patients are looked after by specialists in their condition.

The retired builder said: "The bed was next to where I was on the trolley, in A&E. I was given no blankets, just a sheet. The sheet was manky and torn with holes in it, like the moths had had a party in it. They left me below an air duct and I had to use my own jacket to keep warm."

Mr Ferguson observed that the nursing staff were rushed off their feet. They offered him tea and toast mid-evening, but it never came. The nurses told Mr Ferguson to press a buzzer for assistance if he had further chest spasms, but when he did have more spasms and rang the buzzer, they took so long to respond that Mr Ferguson feared they might have missed it if he had had a serious event.

"They were arriving 20 minutes to half an hour after I pressed the buzzer," he said. "Once the spasms came on, they said they would monitor me, but by the time they got there it was too late. The spasms had stopped. As soon as it happened, someone should have been there to monitor it and check the symptoms.

"It's not the nurses' fault. They have less and less rooms, less wards," he added.

Mr Ferguson was moved to an assessment ward at 5am. He says: "I could not get out of that place fast enough." He was finally given something to eat at 9am.

Mr Ferguson said he had little faith in the complaints procedure so had not made a formal complaint. He did receive a phone call from the hospital apologising for the way he was treated shortly afterwards, but has heard nothing since and has been left unsatisfied by the apology.

Dr Jean Turner, executive director of the Scotland Patient's Association, said his experience sounded "dreadful". "Why have a buzzer for emergencies if you have to wait for 20 minutes," she said. "A lot can happen in 20 minutes."

Dr Turner, who served as an independent MSP after standing against cuts at Stobhill Hospital in Glasgow, said: "I honestly think if you had a little more slack in the beds you would be able to move people around a little bit more easily and would not be doing such a rush job."

The Royal College of Nursing is among organisations who have highlighted capacity problems in the Scottish health service.

Responding to the College of Emergency Medicine report, Theresa Fyffe, RCN Scotland director, said: "We cannot continue to have people waiting for hours in A&E, either because there are not enough staff or because there's no bed on the right ward for them to go to. RCN Scotland is working with Government on its recently announced unscheduled care action plan and we need to make sure this plan involves nursing teams, who have the full range of skills and experience, including the authority to make decisions on patient care."