This is my personal experience. I have installed "Raspbery Pi Wheezy" in to my raspberry pi. I used it to display some browser based dashboard and it going to sleep mode frequently. i found this solution from one of the site i couldn't' remember what it is. Following was the solution what i have used to avoid this issue. It's worked perfect.
1. Open a root terminal in raspberry Pi. Now you need to edit your script that's starting X. In the default build with lightdm.
2. Open "lightdm.conf" file located in,
/etc/lightdm/lightdm.conf
3. Add below line in to SeatDefault section.
[SeatDefaults]
xserver-command=X -s 0 -dpms
4. Restart your Raspberry Pi.
Now issue should be solved.