This is typically a reed switch cable problem. The reed switch board triggers the ibook sleep fonction via a magnet located in the top case. The reed switch board is located in the LCD display and is powered via two very small wires that are part of the inverter cable and these cables go from the logic board to the inverter board via the ibook right hinge. Most of the time one of these cables will cut in the hinge after a while because of the friction caused by repetitive openings and closures of the display. The cable will cut but if the display is at a certain angle the connection can be restored. Replacing the inverter cable should bring back the electrical flux to the inverter and to the backlight.
To QEII Student IT: if you replaced the inverter cable and you still have the same problem then the inverter board or the backlight is the problem or the inverter cable shorted in the hinge blowing the microfuse that protects the inverter circuitry on the logic board.