I've never had a problem anywhere EXCEPT Yosemite. I've been hassled like a begger on the streets for taking a 15 minute nap in the car and last time I tried I was told to leave the park, start hiking or go rent a tent cabin for over 100 dollars. I was doing Half Dome with a friend's son, so I thought 0200 was too early to start. I paid over 100 bucks for 2 1/2 hours in a tent cabin.
DUG, where was this in Yosemite? Really, at 2 AM? How long ago?
I've slept in the car in the trailhead parking area just east of Curry Village, but I didn't know they had midnight rangers prowling like that.
I have also bivouaced in the woods just off the Hwy 120 a few times, but there is no way a ranger would find us -- they would have to come looking with infrared sensors or something.