Milano Centrale is a big station! (I thnk there are around 15-20 platforms!). Get off the train and walk with the crowd towards the centre of the station. You will see a huge indicator board above the main exit door. Look for your Lausanne train there.
Be careful! The board may say "Losanna" for Lausanne and if the train goes on to Geneva, which is certainly does, "Ginebra" for Geneva. OR your train may stop in Brig and you change there - in which case look for "Briga".
I would say that 10 minutes is all you will need to get off one train, locate the platform for the other, and walk to it. But it is always very very crowded. And keep your wits about you! It is rife with pickpockets etc. Do not leave lugage unattended and do not accept "help" from strangers.
It is likely there will be no bar/dining service on the train until Brig so if you think you will want a sandwich or a cold drink, buy them in the Milan station before boarding your next train.