Almost 300 offenders at HMYOI Wetherby were kept locked in their cells after five members of staff were assaulted last week.
The Prison Officers Association (POA) union said officers feel they are not being offered sufficient protection by management.
The Prison Service said the lockdown ended on Wednesday afternoon.
Steve Gillan of the POA said officers had to withdraw to a "place of safety".
There is concern that offenders are not being risk-assessed after being released from the care and separation unit, and officers felt prison staff were being treated as "punching bags", he said.
An HM Inspectorate of Prisons report following an inspection of Wetherby a year ago found that in the six months to January 2015, a total of 212 acts of violence were recorded, an increase of 20 since the previous inspection.
Inspectors found a "significant increase" in the severity of violence between detainees, and the watchdog said reducing the number of assaults should be a priority.
Mr Gillan said: "[Officers] want a safer working environment for both prisoners and staff, because the prisoners are assaulting each other as well as staff, and, quite frankly, that is unacceptable.
"We fully support our members and will work with management now to ensure things get back to normal and that we can get back to a better place."
He said there was a correlation between an increase in assaults recorded on prison staff with the loss of officers' jobs amid budget cuts.
A Prison Service spokesman said the lockdown was a temporary measure.
He said: "An incident at HMYOI Wetherby was resolved at 2.45pm and the establishment is now running as normal."
A young offenders institute in West Yorkshire was placed on lockdown after a spate of violent attacks on staff.