Tobi/Obito could have killed Madara in order to awaken his MS.
So, I'll just cut to the case.
It's stated by Itachi (albeit in a weird manner) that in order to awaken MS, a Sharingan wielder must kill the ones closest to him.
Let's make a list of the known MS wielders.
Danzō Shimura - Stole Shisui's Sharingan, already in MS state
Itachi Uchiha - Killed the whole clan
Izuna Uchiha - Might have killed someone, not out of the question
Madara Uchiha - Obviously a man that would do many things for power
Obito Uchiha - ?
Hatake Kakashi - Still not 100% certain but probably killed Rin
Sasuke Uchiha - Found out the truth about Itachi right after causing his death
Shisui Uchiha - Not enough info on him but he was most probably a part of Root, hence, killed his friend
I feel like I have to elaborate on Shisui being a part of Root.
Although it's not 100% certain, there are a couple of indicators.
First of all, his affiliation with Danzo is kind of sketchy.
I have reason to believe that he gave his eye willingly. Otherwise how could Danzo just snatch it out of it's locket and stop at only one? Why not just kill Shisui and have both?
Besides, his mantra is pretty much the same as Root and Danzo's. The mantra Itachi said that he learned from Shisui.
Self sacrifice... A nameless shinobi who protects peace from within it's shadow... That is a true shinobi.
Although it's not identical, the whole reason the Root and Danzo existed was this mantra. They did the dirty work, protected the village from within the shadows and sacrificed themselves so others could live.
At first I thought Kakashi awakening his MS was just an anomality.
Maybe he awakened it because he already underwent such emotional trauma, losing both of his teammates and Minato. Maybe he blamed himself for the death of Obito, so that counted as ''killing a friend'' or maybe just because he was an outsider with a Sharingan, regular MS laws didn't apply to him...
But after the latest issues, seeing that he probably killed (or caused the death of) Rin, I'm leaning towards believing that what Itachi said was actually true.
You had to kill a friend.
So, this brings up the question. How did Obito gain his MS? He still has his original Sharingan, the pattern is the same as Kakashi's. Which means he awakened it.
There are two possibilities I can think of.
One; he awakened it because he had a shared vision with Kakashi when Rin died. He might have felt that he killed Rin, due to seeing it from Kakashi's viewpoint. Which would be a plot hax and very implausible if you ask me...
Two; he killed a friend.
I'm leaning towards the second option.
Madara had already planned pretty much everything out. He had given his eyes to Nagato, which means that everything was set.
He had no reason to live in his weakened state anymore. Him encountering Obito was probably just a pleasent coincidence (for Madara) and he tweaked his plan accoding to it.
So, under Obito's circumstances, he seems as if he has no one else to befriend other than Madara at the moment. Besides, he owes him his life and Madara's been treating him pretty well up until now.
Seeing that Madara actually ended up entrusting his whole plan to Obito, it would mean that he would want him to become stronger.
Madara already stated that he couldn't live unless he was plugged into the Mazou.
So, all he would have to do would be to pull a Dumbledore.
Let Snape/Obito kill him while he was already going to die and bestow him the Elder Wand/MS.
Anyways, long story short; I theorize that Obito killed Madara thus unlocked his MS.
Cheers! Thanks for reading!