Food is normally available at a few road side vendors 24 x 7 at the following towns on the road at Maddur , Mandya before arriving at Mysore. If it is prior 10 pm then then try out the Kamat Hotel located on either side of the Highway for clean & healthy Veg food (karnataka flavour). The Masala Dosai is really tasty and goes well with the filter coffee. At Maddur always order the famous Maddur Vade and you may be tempted to order a few to take away. Jacob 0091 9342530876
There is another restaurant next to Cafe Coffee Day near Maddur (which is on the right side while travelling from Bangalore to Mysore) that also has 24x7 restaurant. Ample parking space is also available.