I had a pretty similar problem..
After upgrading the RAM on my MPB from 2GB to 4, about half the times i'd open my lid, i'd either be greeted by the startup chime to find that my laptop rebooted itself or to find a black screen and unable to wake my laptop up.
Popped out the new RAM and put back the old RAM in it and haven't had a problem since, now that I think about it I should probably get a replacement for the bad memory 😛
and as a side note.. .I ran the memory test in the apple hardware test program as well as a third party test and both said my memory was fine, so you can't always trust those programs.
dave.