Oh my. This is a full sticky request. Bits and pieces of this info appear across all commissioning source threads. And, all of this is set down in Navy and other Service regulations, most of which can be found online.
A general outline, skewed to Navy, is below, to the best of my knowledge. I have not dug deep into how funded or which are also available to ROTC immediately after commissioning.
At USNA:
VGEP: While a mid, complete undergrad work by Dec of 1/c year. Then, second semester, start Master's in an approved curriculum at a nearby university while still living at USNA. Could be George Washington, American, Johns Hopkins, Georgetown, etc. Graduate and commission with class in May. Finish Master's while staying in area as full-time student by December of same year. Proceed to service selection pipeline.
IGEP: Immediately after graduation, go to 1 or 2 year Master's program on various scholarships. Rhodes, Fulbright, etc. at U.S. and foreign universities. Includes going to Naval Postgraduate School right away. Proceed to service selection pipeline.
Note: the above two options are used by a tiny percentage of the top tier of the class. The vast majority of newly commissioned officers, from any source, get on with their operational careers and get their Master's during their first shore duty tour. In general, a Master's should be in the record before the Commander/LtCol promotion board. Plenty of time and opportunity.
Open to all, regardless of commissioning source:
Naval Postgraduate School, full-time duty. NPS also has some remote locations. Must meet academic profile minimums for intended degree.
Other Service graduate schools also have a few billets available for other services in the interests of jointness. Full-time duty.
Naval War College and other professional colleges, Navy and other Services. Full-time duty, as well as correspondence, online and remote locations with in-person seminars.
Tuition Aid. Officer is on regular duty, uses TA to do online or night classes at university or university extension on the military base. There are many universities catering to the military.
Master's programs that are full-time duty at a civilian school. This isn't common, but can be done in certain circumstances. This is different from IGEP; this is when the officer is a few years into their career.
Have duty as an NROTC instructor, get Master's at that school.
Chief of Naval Operations Internship. Work on CNO staff at Pentagon certain days during the week, rotating through various departments, attend American. One year, I think. Very small number.
NPS Master's in Leadership for USNA company officers. Come to USNA for duty, 1 year for Master's, then switch over to duty as a Company Officer. This started several years ago, when, due to the crazy schedule at USNA, company officers were unable to use TA to get their Master's or had to give up NPS to take a Company Officer job during first shore tour, thus putting their careers in jeopardy and discouraging top-tier junior officers from asking for that duty.
Medical School, Law School - not going there today, plenty of threads on that and how it works.
There are likely some other cats and dogs I haven't included, such as other special fellowships. I have not addressed any additional obligated service time incurred, or how certain degrees are funded. Some of the IGEP schools require the mid to raise portions of the tuition through grants, while the Navy picks up a certain percentage. Degrees are generally required to align with Navy needs, as overseen by NPS.
GI Bill, any form, federal benefits for educations, and state educational benefits, are for veterans, after separation or retirement. Guard and Reserve have programs for those serving, but I know zip about them.
Time to watch Rose Parade.