well, there was a war going on, some Uchihas would be killed.... i am more interested on how he would move outside that room to get the eye.
which means that he either got it before he got stuck in that room on life support, which also means that after his fight against Hashirama and until we reach the 3rd war Madara must had spent some time moving relatively freely; or, some other Uchiha somehow ended up in there and gave him the eye (most unlikely), Madara found a dead Uchiha and took one eye (but not the other?)