It's rather simple, really. With just a few feet of string, some rubber bands, and thumbtacks, you can create a pulley system to turn off your lights without ever having to leave your bed!
Disclaimer: This instructable only works for the type of light switches shown.
Step 1: Materials
Thumbtacks - Again, the number depends on the layout of the room. The longer the distance from your room to the light switch, the more thumbtacks you'll need in order to reduce the slack in the line. You can pick up a pack of 50+ thumbtacks for about $3 at a nearby hardware store, so you don't need to exactly hit the mark on this one.
Rubber bands- You'll need one for the light switch, and one for every three tacks.
Step 2: Thumbtacks
Now start at the head of the bed and start moving towards the switch. A good rule of thumb is to put in tacks at every 2-2.5 feet. In addition, make sure the tacks follow a sort of arc towards the light switch, in order to reduce the strain on any individual set of 3. This is shown in the third picture.
When you reach the switch, you need to put one thumbtack below the switch and one above. These two should line up vertically with the switch in order to be most effective. This is because turning the light on and off requires the switch to be moved in opposite directions. This is shown in the fourth picture
Step 3: String/Rubber Bands
Begin by tying one end of the string onto the light switch, as shown. Don't worry about the rubber band yet; that'll come later. After tying one end on the switch, start threading the string through the top route, following the trail of tacks until there is a length of string hanging down by the head of your bed. Cut the string at this point, and start again from the switch. Tie the string on the switch, but go from the bottom route this time. Refer to the pictures to see examples. Once you've threaded both strings through, put rubber bands on all the thumbtacks. This holds the tacks together, and also ensures the strings stay against the wall.