Also as part of the deal was no compulsory redundancies until the end of 2024.
The Department for Transport says that the funding for the pay offer remains the same as the offer proposed in February, and says it will not cost taxpayers any additional money.
This offer sees the withdrawal of RMT's strike mandate and will allow negotiations between TOCs and RMT on reforms to begin next year.
General Secretary Mick Lynch said: “Our members have spoken in huge numbers to accept this unconditional pay offer and no compulsory redundancies until the end of 2024.
“I want to congratulate them on their steadfastness in this long industrial campaign.
“We will be negotiating further with the train operators over reforms they want to see. And we will never shy away from vigorously defending our members terms and conditions, now or in the future.
“This campaign shows that sustained strike action and unity gets results and our members should be proud of the role they have played in securing this deal.”
Transport Secretary Mark Harper said: “This is welcome news for passengers and a significant step towards resolving industrial disputes on the railway, giving workers a pay rise before Christmas and a pathway to delivering long overdue reforms.
“It remains the case that the train drivers' union ASLEF continue to block their members from having a say on the offer that would take train drivers' median salaries from £60,000 to £65,000 for a 35-hour, 4-day week – ASLEF should follow the RMT's lead and give their members a say.”
A Rail Delivery Group spokesperson said: “This welcome vote from RMT members will unlock a pay rise for our people, and means that fair agreements have now been reached with three out of the four unions involved in the recent industrial dispute.
“Unfortunately, the ASLEF leadership's decision to call further industrial action means passengers still face disruption between 1-9 December, despite an offer remaining on the table which would see basic driver salaries increase from £60k to £65k for a four-day week.
“We want to reach a fair agreement which will get more trains running on time and put the railway on a sustainable footing, at a time when taxpayers are contributing an extra £54m a week to keep services running post covid. Instead of staging more damaging industrial action, we call on ASLEF to work with us to resolve this dispute for the long-term good of everyone who works in rail and the millions of businesses and passengers who rely on it every day.”