Since you have to change platforms twice anyways, I would rather recommend you take the S-Bahn to Marienplatz, a better station to change trains than Odeonsplatz (granted, there's construction going on at Marienplatz, but usually you'll have a way better opportunity to get into the train with all the luggage and the stroller, especially if you walk towards the middle/end of Marienplatz platform - (my personal opinion) - Also, S-Bahn trains to Marienplatz usually depart Hauptbahnhof more often than U4/U5 U-Bahn trains.)
So here we go.
Munich Hauptbahnhof is a dead-end station. So, as soon as you get off the train, walk with the crowd and then head
left to the S-Bahn platforms. Walk down the stairs/escalators and you will face a couple of ticket vending machines. Walk towards those and look right. There are huge TFT monitors showing the next trains to depart (if they are not out of order, again...). Go down the escalators by these monitors and you are at the S-Bahn.
To Marienplatz, take any
S-Bahn train heading in the direction of
Ostbahnhof.
Once you arrive at
Marienplatz, exit the train on the right hand side (hehe) and take yet another escalator down.
Northbound trains will depart on the platform to your right, make sure you catch a U6 train (blue line) to
Garching-Hochbrück or
Kieferngarten since some peak hour trains terminate at
Münchner Freiheit (However, if you intend to exit the train at Odeonsplatz,
Universität or
Giselastraße, that should be ok with you / Though to
Odeonsplatz there's also a direct connection via U4/U5 - as eurovol pointed out earlier)
As for tickets, if you have to go back and forth a lot using the
U-Bahn you might want to consider purchasing a "Partner-Tageskarte-Innenraum." (except you are going all the way to
Garching-Hochbrück which is "Außenraum") There are 1-day and 3-day tickets available. Take whichever fits your needs.
If you only have to make the trip to your destination and back to the
Hauptbahnhof, get a Streifenkarte (stripe ticket). - Since 2 of your boys will ride for free (under age 6), use half of the ticket (5 stripes: 2+2+1) - that will take you all the way to your destination.
Find ticket and pricing info at the
MVG siteHave a nice stay in Munich,
Herzlichst,
Tobi