There are few suggestions to prevent from falling asleep while meditating:
-Placing a hand on the belly to increase breath awareness;
-Keeping eyes open;
-Lying directly on the floor or on a yoga mat and not in bed;
-Bending one knee and placing your foot on the floor. Therefore if you fall asleep, you will likely be woken up by your leg falling over.
Needless to say that lying down to meditate is not appropriate in all situations (e.g. in a waiting room or in public transit).
Mindfulness meditation is not a form of sleep, but a tool to increase attention and concentration. It is good training to facilitate sleep.