Toggling tilt switch
For a one-off you could use a microcontroller + relay etc. or an Arduino + relay and driver.
Either way (assuming the microcontroller has EEPROM), you can choose whether to make the state persistent or not (so if the power fails and is re-applied the output will remain in the previous state or go to some state such as 'off').
All you need the program to do is to monitor the switch state, debounce the switch and control the output. If you require persistent state you'll need to figure out how to talk to the EEPROM (or in the case of the Arduino, use the appropriate library where someone else has done the work for you).
Personally, I'd probably use a PIC12C509 with internal clock and a BJT + 12VDC relay. About 10-12 parts total including a 5V regulator, flyback diode, bypass caps etc. Run it off a 12V or 5V wall adapter.