Hi,
My early 2008 MBP had this issue, and is now currently in repair for this and many other reasons. For me it started happening after it had been carried around in my bag, where the screen was put under pressure from other items such as text books also in the bag.
It then happened twice randomly as you described while using the notebook normally, it also went away when restarting - but even putting it to sleep and waking it up again cured it for me.
For the last 5 weeks it had not done it under any of these circumstances. It is an intermittent problem and the only way to solve it is to replace the entire screen according to my local Apple store geniuses.