Sleep problem


Some times when I go away with a program on screen I wake up the computer by tapping "space bar" I find that the Mac is Frozen except for the Curser which is now a 10mm square. As I move the Mouse the square acts as a eraser on the page revealing a Gray color "fabric" with a picture of a Lion and choice of "sleep, restart & ?" at the bottom. Clicking sleep the screen goes Blank and eventually rests itself, Or some times I have to Power Off. This has only happened since installing Lion. Any answers?