In both countries you will need a visa to enter. And in both countries, as an citizen of India, you can apply for a Visa on Arrival at the airport.
The time it takes in either location is dependent on how many flights arrive from VOA countries around the time your flight arrives. Could be just your flight and you are through in a half hour, could be several flights and you might need an hour or more.
The biggest differences are in costs and requirements.
Thailand's VOA for Indian citizens is 1000 baht (about US$30), Malaysia's is RM330 (about US$80).
Thailand requires travelers to have 10,000 baht (20,000 baht if family) or equivalent, Malaysia requires travelers to have US$1000. Thailand will accept a mix of cash and credit cards, not sure about Malaysia's stance on that.
Both require onward tickets, but you obviously have that covered.
Thailand's VOA is valid for 15 days, Malaysia's for 7 day (but this is just trivia since your stay is only 24 hours). Both expire when you leave, so you have the repeat the process if you layover on your way back.