Well, he does seem to have done the decent thing ?.. or is this another expenses ruse on his part ?
He's trying to take the moral high ground on the decision to cut benefits for the disabled, but it's a political rather than compassionate decision.
Big picture, EU 'In' campaign is a disaster (run by the same bloke who ran the last Lib Dem general election campaign so hardly a surprise). Boris is doing a good job for the 'Out' campaign (he's not in favour of it himself but knows where the grass roots support lies), but IDS is currently being kept out of it because he's a liability.
By resigning now IDS appears humane, raises his profile, and persuades some who loathe him to vote 'Out'.
UK votes for Brexit in June, Cameron resigns.
Two main contenders to replace him. In one corner is Osborne, who will be tarnished by lining up for staying in the EU and these cuts.
In the other corner is Boris, who gets the vote and rewards IDS with a higher profile cabinet job.