TBH, given what we know about Hamas (they don't care about the well-being of the civilian population) and with everything being said by the Israelis (that they will resume military operations once the deal is concluded, and that their goal is to eliminate Hamas), what reason to enter this deal does Hamas have?
Under "normal" circumstances getting prisoners released (especially in disproportionate numbers) along with a ceasefire by the Israelis would be seen as a win for them, which they can "bring back" to their people. But here they are getting very little (at best, a temporary delay in Gazans being totally fed up with them) and are being promised that military operations to destroy them will resume.
What's in it for them?