Goals from Pawel Abbott and Lee Trundle moved the Welsh side upto seventh in the table to keep their play-off hopes alive.
And Spaniard Martinez, who was unveiled as Swans boss at the weekend, was delighted to start his reign with a win.
"That was a massive three points for us," declared Martinez, who replaces caretaker Kevin Nugent.
"It is not easy to go to Millmoor and win because Rotherham must get results but my team was fantastic.
"If my players give that kind of performance and attitude everything is going to be alright."