Due to the lack of rest areas in California and the fact that many are closed for the foreseeable future, this may be a moot post, but the State of California does not allow ONP in their rest areas. They are intended to provide an area where drivers can relieve themselves and take a break from the road.
That said, the question of how long does one need to rest to be an alert and safe driver comes to the forefront. This is not addressed by the MVC and is up to the interpretation of the LLEOs. For the most part it has been accepted that if you are not "camping", you can stay as long as you need to, be that 15 minutes or 8 hours.
My recommendations is not to spend too much time in one but if you need a couple of hours sleep to be alert and safe driving on the highway, take the time. I don't think you'll be harassed.
Any CHP officers out there that want to comment?