The Rambam writes in Mishneh Torah, Hilkhos Teshuvah 8:1 (link): "The goodness reserved for the righteous is life in the World To Come." In other words, the reward for observing mitzvos is received in the World to Come. The standard commentators (e.g. Kesef Mishneh) explain that the Rambam is following the view of R. Ya'akov (the Tanna) who says "Sekhar mitzvah be-hai alma leika -- There is no reward for mitzvos in this world."
However, R. Shlomo Goren (Toras Ha-Mo'adim, ch. 5) points out that this is difficult because of what the Rambam writes at the beginning of the very next chapter (9:1):
Once it is known that a reward is given for fulfilling commandments and that the goodness which we will receive if we follow the way of God as mentioned in the Torah is life in the World to Come... then what is it that is written in throughout the Torah, that if one listens, one will receive such-and-such, and that if one doesn't listen such- and-such will happen to one, as well as all earthly matters such as plenty, famine, war, peace, monarchy, humility, living in Israel, exile, success, misfortune and other covenantal matters? All these matters were true and always will be. Whenever we fulfil the commandments of the Torah we will receive all good earthly matters, and whenever we transgress them, all the mentioned evils will befall us. Nevertheless, the goodness is not all that the reward for fulfilling commandments consists of, and the evils are not the entire punishment received by transgressors. This is how all matters are decided: The Holy One, Blessed Be He, gave us this Torah, which is a support of life, and anybody who does what is written in it and knows that everything contained in it is complete and correct, will merit life in the World To Come. He will merit [a portion] in proportion to the magnitude of his actions and to the extent of his knowledge. The Torah assures us that if we fulfil it with joy and pleasure and always act according to it, then all things such as illness, war, famine, et cetera, which could prevent us from doing so will be removed, and all things such as plenty, peace, richness, et cetera, which will aid us in fulfilling the Torah will be influenced to come our way so that we will not have to occupy ourselves all day in [obtaining] bodily needs, but that we will be free to sit all day, learn and gather knowledge and fulfil commandments, in order to merit life in the World To Come.In other words, the main reward for observing mitzvos is in the World to Come but there is also reward in this world. R. Ya'akov could not have held that position, as can be seen from the following passage in Kiddush (39b):
Someone whose father told him to go up to a building and bring chicks, and went up, sent away the mother bird, took the chicks and on the way back fell and died... where is the good he is supposed to see?... R. Ya'akov saw this happen.Someone was fulfilliing two commandments at the same time -- honoring one's parents and sending away a mother bird before taking the chicks, both of which explicitly promise in the Torah long life -- and the man died. R. Ya'akov explained this as being due to the Torah's rewards referring to the World to Come. If he held like the Rambam, that there is reward in this world to hepl us do more mitzvos but mainly in the World to Come, why didn't this person live longer so that he could do more mitzvos?
I think that rather than holding like R. Ya'akov, perhaps the Rambam follows a different view in that extended passage. Let's briefly review the entire passage in Kiddushin (39b).
- The Mishnah says: One who does a Mitzvah, God will bestow good to him and lengthen his days, and he will inherit the land.
- The Gemara (Rav Yehudah and Rav Shemarya) explains that this Mishnah is talking about someone who does one mitzvah that raises him above 50-50 mitzvos/ aveiros.
- A Baraisa is quoted as contradicting the Mishnah: Anyone whose merits outweigh his sins, God will do evil to him, he will be appear to be punished as someone that burned the entire Torah.
- Abaye answers: Mishnah refers to God making for someone a "good day" and a "bad day" (two explanations of this below).
- Rava answers: The Mishnah follows R. Ya'akov who says that reward for a Mitzvah cannot come in this world. Then comes the above story about R. Ya'akov.
Rashi explains Abaye as meaning that the Mishnah is talking only about the World to Come, i.e. the "good day" is a reward in the World to Come. Tosafos ask that, if so, Abaye is givingthe same answer as Rava/ R. Ya'akov. Yet the Gemara seems to differentiate between them. Therefore, Tosafos explain that "good day" refers to rewarding someone wicked in this world so he receives only punishment in the World to Come and "bad day" is punishing someone righteous in this world so he is rewarded in the World to Come.
Perhaps we can suggest that Rashi (within the view of Abaye) and the Rambam agree on the general mechanics of reward, if not on the reasons for them. The main reward for observance of mitzvos is in the World to Come, the "good day", but sometimes minor rewards are given in this world. Thus, according to Rashi, Abaye does not agree with R. Ya'akov, who holds that there is no reward at all in this world. But he does agree that reward is predominantly in the World to Come. And this view of Abaye seems to be the Rambam's view as well.