Depending on what career path you choose (or whichever one the military chooses for you) will determine when you can get your master's degree. In general, it is not advantageous to get your master's degree immediately after you commission. While your peers are getting evaluated and completing your training, you will be falling behind. I can only speak to the Navy side of things, however I imagine this is true elsewhere. Here is a quick rundown of when you will be able to get a master's degree in the Navy.
Pilot/NFO (8 year commitment after flight school): You might have the chance to go to an NROTC unit and earn a master's after your first shore tour (~5 years into your 8 year commitment), however this is seen as a career killing move and most people get out after this. In general, if you want to make a career out of the Navy, they will make you go at some point after your initial 8 year commitment is finished.
SWO (5 year commitment after commissioning: The SWO community has really tried to improve retention and they have given SWOs several choices with regards to how they want to pursue a career. You could go to graduate school as early as the end your first sea tour (2-3 years into your commitment). Another option is going back to an NROTC unit. NROTC billets are extremely valuable within the SWO community and they generally send very good officers to NROTC units. There is a lot of flexibility with this career path so if this is something you want to do, talk to your advisor at your NROTC unit.
Submarine/SWO(N) (5 year commitment after power school for submarine and 5 years after commissioning for SWO(N)): Completing power school gives you what is considered to be a master's degree in nuclear engineering (this is only within the nuclear power industry, however it can't hurt to have this on your resume). "Nukes" can also go back to NROTC units to get their master's, and it is generally considered not to be a career killing move.
SEAL/EOD (5 years after completion of training): There isn't that much out about these programs and their career paths. I would assume that if you want to stay in they will make you get a master's degree but I'm not sure.
NROTC scholarships do not cover graduate school. You may use the GI bill or have the Navy pay for a master's degree after you commission.
If I got anything wrong, feel free to correct me. OP, good luck on your future endeavors and feel free to PM me with any questions.