2 nights, 3 days works out real well.
If you can, check into the onsite hotel early in the morning at 7am and start your visit to the parks. It's not guaranteed, but sometimes a room will be ready. That way you can unpack a few items, and then head over. If the room is not ready, you still get your magic keys.
If you are flying in, or driving down, it's best to check into a cheap hotel the night before to save some money if you will be arriving late in the afternoon.