Prior to its untimely demise, Alderaan was a center of commerce and culture in the Core Worlds. It had a long and rich history, it was a famed tourist destination, and it was a strong presence in the Senate. Leia was well-known as the youngest Senator in history, and it's entirely conceivable that Han would have at least heard of her.
That sort of political power doesn't come without at least some degree of material wealth, and much of it would have been off-world. Leia or her family owned or controlled more wealth than Han dreamed of (and he can dream of a lot). Even including his ship, his total net worth was significantly lower than Leia's, even after Alderaan's destruction. He had every reason to expect she could have paid him a handsome reward.
He was also desperate for money. He owed Jabba money, 10,000 or more credits. That's almost enough to buy a small ship. He also had operating expenses - ships need parts, fuel, and supplies. Oxygen scrubbers need changing, engines need grease, etc. To keep flying, he needed cash. He was in dire need and the money he had so far gotten for the trip (a paltry 2 thousand, since they never reached Alderaan to get the remaining 15) were going to barely cover his expenses, let alone debts.
Given that his life was already in extreme danger (trapped on the Death Star) and his future looked bleak (no way to pay Jabba) he was willing to take the chance. He didn't get played by Luke, Luke just reminded him of a fact that he, in his melancholy state, had forgotten: there was still a chance to get paid and save his hide. And it wasn't really that much more dangerous to go to a prison area (where the guards were worried about escape, not break-outs) rather than staying in a conquered guard tower (where shift changes or random security sweeps could occur without notice, and they'd be immediately suspect).