The Spaniard held talks with Toffees chairman Bill Kenwright last week and a deal has now been agreed to buy out the remaining year of Martinez's contract.
Whelan told BBC Radio 5 Live: "I've reached some terms with the chairman, Bill, of Everton about six o'clock this evening.
"He can now talk to Everton because Bill and myself have sorted the compensation."
Martinez had already held talks, with Whelan's permission, but is now free to discuss contract terms.
"He'd spoken to Everton because I gave them permission," Whelan said.
"When he came back and told me how it had gone, it had gone very well and he was probably in the last two or three on the list.
"Then the chairman rang me and discussed the compensation deal with me, and we agreed that this evening."
Porto coach Vitor Pereira and former Schalke boss Ralf Rangnick had also been linked with the vacancy.
Martinez, 39, was linked with the Everton vacancy almost as soon as David Moyes' departure to Manchester United was confirmed.
Whelan initially suggested, before FA Cup winners Wigan's relegation from the Barclays Premier League, that Everton were not a big enough club to tempt Martinez away.
But he said: "Sometimes I wind the chairman up at Everton because we've had some really serious fun and entertainment watching Everton play Wigan. We get on so well together.
"When I say things like 'I thought you meant a big football club', I'm winding Bill up. They are a big club, no question.
"After leaving Wigan, I think Everton is the next stop of Roberto before he goes to the very, very top.
"Everton is run very similarly to Wigan, it's a family-run club, a friendly club with a great bunch of supporters. They're a bigger club than Wigan and it's a super club.
"(If he goes) I will say to Roberto - which I've already said, because I had a meeting with him tonight [Monday] - I will wish him nothing but the very best of luck."
Whelan added that he has yet to hold talks with any of the extensive list of applicants for the prospective vacancy at the DW Stadium.
"I've not been able to interview anybody," he said.
"We've got about 30 people who've applied for the job and I've not been able to interview one of them because of this agreement over the compensation, I didn't want to jeopardise that.
"I'd be unfair to speak to anybody about giving them a job at Wigan when I'm not clear to offer them a job. Now that's changed.
"In football there are always some good managers without a position. We've had some very good people apply for the job. I'm sure there are half a dozen top-class managers amongst them."
The interview process seemed to begin live on the air as, with Whelan still on the line, studio guests Neil Warnock and Owen Coyle sang his praises and those of the club.
Former QPR and Leeds boss Warnock said: "He's (Whelan) the most attractive thing about the job. Look at the chairmen I've had in the last few years!
"He's football through and through and supports his manager come rain and shine. As a manager, that should be the first thing you look at, does the club have a good chairman?"
Coyle, sacked by Bolton in October having previously enjoyed success in the north west as Burnley manager, added: "Wigan have very good players, it is an attractive job.
"I have been linked with it and I'm very flattered."
Everton responded with a statement on their website in which they insisted no appointment is imminent.
The statement read: "In response to regrettable and somewhat premature reports earlier this evening, Everton Football Club are continuing discussions with regards to the vacant managerial position.
"Whilst positive moves are being made, the club will officially announce details as and only when they are agreed and completed."