  Motivated by experiments on splitting one-dimensional quasi-condensates, we
study the statistics of the work done by a quantum quench in a bosonic system.
We discuss the general features of the probability distribution of the work and
focus on its behaviour at the lowest energy threshold, which develops an edge
singularity. A formal connection between this probability distribution and the
critical Casimir effect in thin classical films shows that certain features of
the edge singularity are universal as the post-quench gap tends to zero. Our
results are quantitatively illustrated by an exact calculation for
non-interacting bosonic systems. The effects of finite system size,
dimensionality, and non-zero initial temperature are discussed in detail.
