Many elaborate, and sometimes tedious, methods have been developed over the past 150 years. Some of them involve the use of substances which today are unobtainable legally by amateurs and legally obtainable by professional researchers only after coping with copious bureaucratic procedures and forms. In the 19th Century, medical schools often had great difficulty obtaining cadavers for dissection and, as a result, medical science frequently ended up subsidizing grave robbers, thus creating a cottage industry. Narcotics, such as cocaine hydrochloride, were often used as a means of anesthetizing small invertebrates before killing and preserving. Ironically, today, any street-wise college or high school student can obtain it with little difficulty and, if he or she is careful, with only minimal risk from the authorities.
Physiological risks are quite another matter.
What the authorities should do is donate confiscated drugs to medical research institutions, hospitals, Dr. Kevorkian, and universities. Chloral hydrate was often used as an anesthetic for small invertebrates and also as an ingredient for Hoyer's medium, which is an excellent mountant for nematodes and other small creatures. Today an amateur can't obtain it and professionals have to go through all the paperwork nonsense. Some marine invertebrates can be effectively relaxed and killed by transferring them to fresh water. In general, it is best to do this by means of a gradual infusion of freshwater into a small amount of salt water in which the specimens have been allowed to relax.