Upvote:3
Yes, there is no requirement to stay overnight. You can just write "TRANSIT" for your address in the entry form.
This of course assumes you have a valid visa or visa-free status for Malaysia, and it may be helpful to prebook your bus ticket out of Malaysia, so you can show it if asked.