Cockroaches don’t make much distinction between your desk and your toilet, to them they’re about the same, they do their lives without cariing much if that gigantic piece of landscape is a desk or a chair or a bed. Sometimes cockroaches just die while playing the dangerous but pleasant practice of autoerotic asphyxiation. Fact.
Maybe it had been working while you were out? Looks like a classic case of karoshi to me.
Some pesticides do cause them to go a bit mental and spasm-y though because of neuronal overexcitation, if it was indeed poisoned.
I’m not sure that insects care all that much about where they die. It might just be that you only notice the ones that die in the open. Have a look under your fridge.
Hate them…but admire them. I opened the pullout tray on the front of my washing machine to add soap. Found a big cockroach sitting in the soap tray. Ain’t easy to get there.