The effect that lack of sleep has on your safe driving ability is the same as:

Fatigue and being under the influence of alcohol have similar effects on your ability to drive safely. For example, being awake for 18 hours impairs your driving about as much as a blood alcohol level of 0.05 percent. Being awake for 24 hours in a row has the same effect on your driving as a blood alcohol level of 0.10 percent.
DMV Writen Test