I've been thinking this and Trump has now claimed it.
A prisoner swap is small potatoes but Obama had kept it off the table until suddenly now.
My interpretation: Iran thinks Trump may be the next American president and they don't like the prospect of going from Obama softball to Trump hardball. Wiping out one of Trump's planks while getting something for themselves, makes sense.
Every story is complex and the specifics of who is being released matter. The impulse to release the prisoners, the proximate cause, may well have been triggered by Trump's ascendancy. Remember, this was the same week Iran took American sailors at gun point and humiliated Obama. Obviously Iran doesn't mind being disliked. They're getting some hackers back and the US is getting some civilians back.