The best boondocking is on the southside just outside the park at the Cottonwood entrance off I10. Even better is stay on the same road, cross over I10 into Box Canyon and find a nice cosy place among the rocks
The problem though is its a long drive back to the park attractions. If you come in from Death Valley, go to Barstow and take 247 south. Its a long empty road but used by the locals to avoid the terrible traffic going around. It will take you to Yucca Valley. Once in Yucca, turn east to the small town of Joshua Tree. Stop at the visitors center and talk to the rangers about camping. If inside the park is filled, ask about Indian Cove. Its huge. Also tell them how much time you have and ask about what to see and times of tours etc.