Owning Apple device is prestigious & costly so it create device owner think more about safety of his device from miss handling.
So being yourself iPhone, iPad and iPod touch device owner you must have bought cover or case for your device.
All iOS device has one functionality that closing flap cover sleeps or shut down iOS device whether be it iPad or iPhone or iPod touch.
Here is how to activate this functionality & make it work if it is not working on your particular device.
Go to ‘Settings’ > General > Lock / Unlock (Now activate Lock /Unlock slider by sliding it to right)
You are done,
Now closing your particular iPad flap cover should sleep or shut down device & opening flap cover iPad will wake up to login prompt if any.
Hope it helps,
Thanks & Regards