According to Sarah Huckabee Sanders, the White House received Sessions' resignation letter early on 11/7, and the President accepted his resignation that day. No direct motive has been stated, but Sanders has expressed Trump's frustration with Sessions for months.
According to unnamed insiders and the Democrats, he was fired the day after Midterms to avoid riling up the Democratic (and Republican, to some degree) base right before the elections but giving Whitaker 70-80 days of access to Mueller before the 'recess appointment' excuse is no longer feasible.
Why does Trump want Whitaker to have access to Mueller during that time? Nobody's sure. Pelosi and Schumer seem to believe Whitaker was made acting AG in order to fire Mueller. Others point to his past statements about his stated strategy to defund Mueller (to make him unable to function but not fired), but that's not feasible, considering the budget isn't passed for several months, long after Whitaker is gone. Personally? I think any early access to Mueller would be able to gather useful information that Whitaker can bring back to Trump's defense team, and as he's now law enforcement, he can commit the procedural 'dirtying the water' sorts of moves that get cases thrown out.