It soon escalated into a battle fought with rocks and chairs.
The prison holds more than 3,400 inmates in a space built for 800 - a result of the country's war on drugs.
Officials say the violence began when members of one gang were rushing to carry a prisoner to the prison's health clinic while he was suffering a seizure.
In their haste, they kicked over a bucket of water onto the sleeping members of a rival gang,
The ensuing riot resulted in the death of one of the prisoners caught up in the fighting and killed the man having the seizure.
Quezon City jail is overcrowded largely because of President Rodrigo Duterte's controversial anti-drugs campaign, which has led to thousands of people being killed.
Prisoners are squeezed in like sardines, critics say, and have to take turns sleeping in whatever open spaces are available - whether a staircase or an open-air basketball court.
Human Rights Watch has condemned jail conditions, describing them as hell-like.
Authorities have pledged to construct new facilities at the site to reduce overcrowding but they have cautioned that it cannot be done overnight.
Philippines jails were ranked the third most congested in the world even before Mr Duterte assumed power last year.
More about: #Philippines