Freezing them is good but can take a day or two. The alternative method is to put your maggots in bait tub in just enough water (cold) to cover them. Boil a kettle then slowly add the boiling water to the maggots. only half a cup full or so at a time. The idea is to slowly bring the maggot's water up until lierally the maggots stop dead. 
The fish don't give a to**, but the maggots don't like being on the menu so they burrow into the silt. This isn't such a bad thing, it can get the fish rooting around and interested..it might well keep them in your swim.
But dead, they stay on the bottom and are easier to find, the fish might even get a bit competetive about them and then they get reckless. But too many dead maggots might just over feed them.
sit out in the sun with them in their box!
i emptied half a pint into a small green box yesterday while down the river, so that i could use them without spilling them. i left 1 1/2 pints in a black bait box which i stood the green one on top of. i thought it would help keep them cool. any way after a hour i opened the black box only to find two thirds of them were dead (cooked).
Would not go anywhere without dead maggots in the winter time and rarely use a live one when fishing the commercials. Pop them in the freezer the night before, no later than 10pm, or they may survive and come round the following day. For the hook just roll the maggot on your knee a couple of times an hey presto its kippered. The freshly rolled maggot will still be plump and better on the hook than the frozen.