If you see that someone has been sleeping for a while on the bus or the train then go ahead and wake up them up to inform them. The best way to this is to always be polite. Start of with, “Hi, I've noticed you've been asleep for awhile now and you might have missed your stop already.”