Turning On/Off Monitor Raspberry Pi Scripts

You can use these scripts to turn on/off monitor of raspberry pi

tvservice --off > /dev/null

export DISPLAY=:0
tvservice -p
fbset -depth 8; fbset -depth 16; xrefresh

Another option (this is failed when tested because apt-get doesnt found cec-util package):

apt-get install cec-util

# Screen on, change to the active input of the Pi

echo "on 0" | cec-client -s > /dev/null
sleep 5
echo "as" | cec-client -s > /dev/null

#Screen off
echo "standby 0" | cec-client -s

– https://www.danpurdy.co.uk/web-development/raspberry-pi-kiosk-screen-tutorial/