There is no law that prohibits you from assigning yourself and using a middle name. In that sense yes, it will be legal.
I'm not going to claim that it can't cause any kind of confusion or problems. For the most part it won't. There are going to be times when you have to use the name that appears on your ID exactly as is, but that applies to all of us. I use an abbreviation of my given name and don't use my middle name at all, but if I'm buying an airline ticket I have to use my full given name and my middle name because that is what's on my passport. But no one is going to throw you in jail or kick you out of the country if you, for non-official occasions, use a middle name that was not given to you at birth.

