As far as location, Queen Mary can't be beat for convenience to the port at Long Beach. It's an easy walk on level pavement between the two -- I'd say about 5-10 minutes.
How long will you be in Long Beach? Do you have a full day there or a few hours?
Whether the Mary is worth a stay is pretty subjective. We stayed two nights pre-cruise, and I loved it as I am a liner junkie. But, if you are only looking for a place to sleep, I'd consider long and hard. Other than the port and a small shopping area, there's really nothing within walking distance. You can certainly go into Long Beach by taxi to dine, visit the aquarium, etc., though.