This is a formal rest area where sleeping is allowed and legal. It's good for a night or two, but not a place to settle and make it a campsite.
Otherwise the view is absolutely amazing and there are toilets open 24 hours. Just be aware that the place gets packed during the day and even during the night there are photographers and others around.
Place: Vista Point San Francisco
Location: 37.83286, -122.47969