He got hit while sprinting which isn't the most stable form of movement and fell. He sat upright and wasn't even demanding anything, no waving for the ref, nothing. Just sat there and felt if everything was okay.
Along comes Pepe and "connects" his head with the head of Müller. It wasn't a real violent headbutt but it was a hit nonetheless. Rules state that even the try is Red... He certainly did more than just try when he actually touched him.
Müller obviously had the impulse for drama at first, realised it wasn't that bad and instead got in the face of Pepe.
If anything was wrong then Müller should have gotten Yellow for getting in his face. Tho that is a pretty understandable reaction.
In the after match interview he said that he felt a little hit on his head without realizing it was Pepe's head. Asked if the Red was deserved, he answered that he can't say, he hadn't seen the video yet and that it's up to the ref anyway...
All fair on the side of Müller and Pepe deserves Red just for the attempt. It's not a fucking pub brawl but a football World Cup.