How could Madara free himself from the Impure World Resurrection technique, while Tobirama can't?
When Madara frees himself of the Edo Tensei, he performs the seal. But in the case of Tobirama, you can see that in the first attempt he only tries to crush the wall. Also in the next page you can read this:

Hashirama: You increased the restraining power using my cells.
Tobirama: Now that I sense better, his body is almost made of my brother's cells.

So Madara was able to free himself because no one restrained him before he performed the seal; in the case of Tobirama, he tried to destroy the wall first and Orochimaru was able to restrain him with the increased restraining power he has.