Patients are being left lying on trolleys for up to 24 hours because hospitals are alarmingly short of beds, the union representing Britain's nurses has claimed.

Pressure on beds is so great that some people end up being treated in corridors, especially in A&E departments, according to a survey of 1,246 UK nurses and healthcare assistants belonging to the Royal College of Nursing who look after some of the sickest patients.

The findings have prompted warnings that NHS care is deteriorating due to a financial squeeze, rising demand and falling bed numbers. One in five (21%) of nurses said they saw patients receiving care in corridors or other areas not designed for providing treatment every day, though 4% said it occurred hourly. Emergency departments are the worst affected. Just over half (51%) of the emergency department nurses said their patients were cared for in these places, while almost one in five (18%) said that it occurred hourly in their A&E.

Patients' safety is being compromised by keeping them in such locations, four out of five nurses (79%) believe. "Treating patients in corridors or in areas not designed for care is a high-risk strategy which can have a serious impact on patient care," said Dr Peter Carter, the RCN's general secretary and chief executive. "Patients need to be able to interact with staff, to be able to reach call bells and to know they are visible. They also need regular monitoring and easy access to equipment if their condition deteriorates."

The survey "paints a worrying picture of what is happening in our hospitals", he said. It follows a patient survey by the NHS regulator in England, the Care Quality Commission, which uncovered concerns that there were too few nurses, that some patients were facing long waits for surgery, and that hospital food is inadequate.

Just under half of nurses (48%) in the RCN survey said they had seen patients either being cared for or being asked to wait to be cared for on a trolley for a long time in the last six months. While the patients' average waiting time was six hours and 23 minutes, 5% of nurses had seen patients having to endure a wait of more than a day on a trolley.

Financial pressure on the NHS means it is returning to the time – last seen in the mid-90s – when such incidents were not uncommon, Carter said. "Two years ago we warned that the need to make £20bn of efficiency savings in England alone would risk sending the NHS back to the days of treating patients in corridors or areas not designed for care. Sadly, it looks like those days have now returned."

Hospital bed closures should be stopped until alternative ways of treating patients in community settings are in place, Carter added. In the decade between 2001 and 2011 the average daily availability of general and acute beds in hospitals in England shrank by 22%, despite rising demand partly prompted by the ageing population. Over the same period, A&E attendances grew by 60% and emergency admissions by 56%. "This sort of situation is not only unacceptable from a patient experience and safety point of view, but causes great distress to families, carers and nursing staff," said Carter.

The NHS Confederation, which represents hospitals, said "no one should be treated in a place that is unsuitable for their needs or puts their care at risk". Mike Farrar, its chief executive, admitted hospitals in England are under strain because of "growing financial pressure and significant structural upheaval".

However, he said it was "simplistic" to blame pressures in A&E simply on bed closures. He added: "The quality of our out-of-hours care may be leading to extra demand, while problems with social care could mean that some patients end up taking up hospital beds because they cannot be safely discharged due to a lack of services when they return home.

"This worrying survey suggests that the NHS is heading back to the bad old days of the 80s and 90s, when patients were left on trolleys for hours on end," said Andy Burnham, the shadow health secretary. "It challenges the prime minister's oft-repeated claims that everything in the NHS garden is rosy and exposes the reality on the ground."

Simon Burns, the NHS minister, said: "There is no excuse for patients to be left waiting on trolleys. The NHS has beds free and available, and hospitals should be supporting their nurses to ensure that patients are admitted to them quickly," he said. However, he added, rising demand for healthcare meant more services had to be established outside hospitals to take the pressure off them.