Eliminate accidental unplugging with the Loc-In Locking Outlet Plug. The Loc-In permanently attaches to the plug of any corded electrical device (2 or 3 prongs) and then plugs in to the outlet; a switch on the side lets you lock it in so the plug can’t be pulled out of the outlet until you flip the switch back.
Great for child safety, appliances and tools that continually unplug themselves (like vacuums, dryers, hair dryers, etc), extension cords, corded power tools, refrigerators, home security or other devices that are essential and would be disastrous if unplugged. Loose fitting plugs are no longer a problem. Kids yanking the cords out of the wall- not anymore! Just over $5 and it can be incredibly handy to have in your home.
UPDATE: It looks like these are no longer being sold. An alternative solution is an outlet cover like this that will provide a similar function.