When Potifar, a courtier of Pharoh, purchased Yosef, his fortune changed. Everything that Yosef got involved in was successful, thus drastically impacting his master's riches. This did not go unnoticed by Potiphar, as the verse states, "His master saw that G-d is with him, and all that he would do G-d would make successful in his hand." Rashi, on the words "that G-d is with him," explains that the name of G-d was constantly on Yosef's lips. This is understood to mean that Yosef would regularly refer to G-d in his everyday conversation. However the Ramban and the Maharal disagree with Rashi based on the following Medrash:
"Rav Huna in the name of Rav Acha said, [Yosef] would whisper when he would leave the room, and when he would enter. If his master requested hot water, behold [Yosef] would have hot water. If his master requested lukewarm water, suddenly [Yosef] had lukewarm water. [Potiphar] said, 'Yosef, why are attempting to bring witchcraft to a country that is already full with witchcraft?' At that moment he perceived the Divine presence resting upon Yosef. This is what the verse was referring to when it states, 'And the master of Yosef saw that G-d is with him.'"
So while Rashi believes that Yosef simply referred to G-d in his everyday conversation, the Ramban and the Maharal look deeper. The Maharal explains that this highly unusual revelation of G-d's Divine presence to an undeserving man was because of his mistaken observation that Yosef was muttering incantations to instantly fulfill his requests. Therefore G-d felt it necessary to reveal the source of Yosef's unbelievable abilities, in order to correct that perception. What were Yosef's mutterings? They were silent requests to G-d to help him properly fulfill his master's demands. However we can ask, what was the reason for Yosef's instantaneous miraculous success?
The Nesivos Shalom addresses this issue by quoting a famous passage written by the Rambam in his sefer Moreh Nevuchim (Guide to the Perplexed). In it the Rambam teaches us that one who attaches himself to G-d will merit success in all that he does. But the moment this individual disconnects himself, G-d will remove His Divine presence and the opposite will occur. He will begin to fail in every possible way. Yosef lived constantly with this concept of "Shivisi Hashem l'negdi tamid," that one should continually place G-d before him. Hence, Yosef revealed this lesson of the Rambam.
Based on the above, perhaps we can suggest that Rashi is not arguing with the opinions of the Ramban and the Maharal. We learn from the saga of Yosef in Egypt the measures one must take to safeguard one's self during the perilous situation of exile. Technically the concept "Shvisi Hashem l'negdi tamid," is fulfilledwith a subconscious constant realization of the "Six Constant Mitzvohs": 1) Know there is a G-d. 2) Don't believe in other gods. 3) G-d is one. 4) Love G-d. 5) Fear G-d. 6) Don't be misled by your heart and eyes. Yet, Yosef's difficult situation demanded that he constantly verbalize his connection to G-d. Dropped into a world that was the antithesis of the G-d-fearing home he grew up in, he needed to verbalize his realization of G-d in order to internalize those lofty concepts. Whether it was in regular conversation or carrying out his master's orders, G-d was on his lips. Therefore it would be possible to say that Rashi's explanation takes into account the above medrash.
The lesson learned from Yosef is timeless. As then, we are in no better a situation spiritually as the world around tries to distract us from our relationship with G-d. We can protect ourselves in the manner of Yosef, by constantly mentioning G-d, talking to Him and seeking His help. May we merit, with G-d's help, to see success in all our endeavors, spiritual and physical.