Sleeping in my car

If I drive to a party, but decide that due to the amount of alcohol consumed I should not drive, is it legal for me to sleep in the car?