Swansea coroner Philip Rogers said Wednesday, "It doesn't need me to say trying to put as much food in your mouth as possible is a dangerous thing at any time."
The inquest was told that Deeley, originally from Birmingham but studying graphic design in Swansea, had been in good spirits.
Deeley - who worked part-time in the bar but was off-duty at the time - saw a group of people trying to put as many cakes in their mouths as they could from a buffet that had been put on following a photographic exhibition, reports WalesOnline.
He did not know the people in the group but decided to join in by trying to put about five cakes in his own mouth, the inquest was told.
Shortly afterwards, Deeley began choking and was helped by Daniel Finselbach, a colleague working in the bar, into the toilet.
Finselbach performed the Heimlich manoeuvre on Deeley but he collapsed on to the toilet, hitting his head.
(The Heimlich manoeuvre is an emergency technique for preventing suffocation when a victim's airway becomes blocked.)
Paramedics were called to the scene but Deeley was found to have gone into cardiac arrest.
He was taken to the city's Singleton Hospital, but attempts to resuscitate him failed.
Dr Maurizio Brotto, who carried out a post-mortem examination, said the cause of death was choking due to the impaction of food in the upper and lower respiratory tract.
Deeley had been drinking and was about one-and-a-half times the drink-drive limit.
But Dr Brotto said he did not think this would have made someone who was used to drinking incapable of understanding what they were doing.
Returning a verdict of misadventure, Coroner Phillip Rogers said: "The cake eating 'competition' was a purely spontaneous event amongst the young people who were there. It was nothing to do with the management of the bar."
He added: "Mr Deeley entered into it in a light-hearted, high-spirited way and didn't really know the people who were there. This unfortunately led to his death."