Probably not, even though Nietzsche might have had some kind of share for the idea to widespread and root deeply into the Western pop-culture.
First of all, I've realized that the saying "be yourself" substantially relate to the question of a person's identity. On one side, the urge to live authentically had become one of the main topics of decadence where the role of Nietzsche's thoughts is, indeed, undeniable. On the other hand, I guess his popularity might had been a consequence of the growing corresponding moods in the society. These growing moods might even have had their roots in the philosophy of naturalism.
I've searched through the Google books to find the oldest mention of the phrase "be yourself" and the first to actually relate to the context we understand it in today might be the Socratic dialogue between a "Christian" and a "Socianist" in Christianity and modern infidelity: their relative intellectual claims compared written by Morgan, W. (Williams) in 1854.
The two of the debaters invastigate how can our surrender to God be consistent with the urge to be free. At the same time, people were affected by the biological knowledge that had lead to naturalism - that we are determined by our biological predisposition (Hippolyte Taine). This might have lead to the urge to fulfill your predisposition which is pretty much what lies behind "being yourself". Here, the writer, dealing with the contradiction of having free will and surrendering to God had, in fact, captured the basic question of self-identification:
You yourself are thus the fact of a spirit incarnate ; which fact,
nevertheless, being yourself, yourself cannot accept.
Note that the context of the debate (the new religious "fidelity" and critique of the stifling religious institutions) seems to be very similar to the context of Nietzsche's philosophy (this notion supports the consequence-hypothesis mentioned earlier).
The first definite mention of the phrase "be yourself" in the given context can be found in Ethics of Success written by William Makepeace Thayer (not to be confused with W. M. Thackeray) in 1893 (just five years before Nietzsche's Human all too human!). We can see Thayer has written a very clear formulation of the current understanding of the idea you should "be yourself" (in a chapter called "be yourself").
Thayer makes the point we should live honestly so we could always speak honestly, a point very similar to those that can be seen in contemporary psychological literature. Thayer even quotes the naturalist George Crabb (1754-1832):
The frank man is under no restraint, his thoughts and feelings are both set at ease and his lips are ever ready to give utterance to the dictates of his heart.
According to the Google NGram, it was about this time when the phrase started to be frequently used in literature.
So I guess that the origin of the phrase "be yourself" is so complex we can't really ascribe the authorship to a single philosopher, even though there's a good chance Thayer was the one to spread the phrase (even though he didn't have to be the first to come with the idea of meaning of life as cultivating and getting to know yourself).