I have students who work and so by the time they get to class they are tired and sleepy. What I normally do is sit them by the aisle so they can avoid leaning on the wall and fall asleep. When I lecture I walk around and it is easier for me to just tap my fingers on the desk without having to much classroom distraction.
I also call students at random during lectures and also during laboratory practical exercises to much sure they are doing their work.