This is a mix of what I remember reading some time back, backed up by a quick search on wikipedia.
M is for McLaren of course, from the name of Kiwi team founder Bruce McLaren, an F1 driver in the 60s who drove for Cooper before founding his own team. All of the team's first cars were number Mxx: the M7, M14 and M19 were the most prominent of the early models, then the M23 won McLaren's first two championships in 1974 (Emerson Fittipaldi) and 1976 (James Hunt). The P4 stands for 'Project 4', designating McLaren cars since 1981, due to the arrival of a new design team and the takeover by Ron Dennis. Originally, MP4 stood for 'Marlboro Project 4', after the title sponsor. In 1997, that title sponsor changed, and since, the M stands for McLaren.