Yes as long as the slow cooker is in good condition then yes it's safe to leave the slow cooker on overnight and while away from home.
I use my slow cooker a lot overnight and while away from home and it never has been a problem.
Some foods such as beans take many hours to cook and be ready so I'll put the beans in the slow cooker and let it cook while I'm asleep or while I'm gone away from the house and when I get back or wake up in the morning the beans are ready to eat.
When cooking foods that require water just be sure to keep it filled with enough water to prevent it from drying out.
Slow Cookers are used by many people safely while asleep or when away from home and that's the purpose of slow cookers to cook food easily while you're away from the kitchen.