Really sorry to hear this. Could you try giving him a bit of sugar water? Or honey if you have it. How old is he? It's possible he just pined - I had an older hamster who went a bit like this after we went away for a week-end. He looked terrible but came round again. It's also possible he may have got too cold if there was no heating on? And could be close to going into torpor. Hence the sugar water to boost blood sugar and keep the room warm. Also could he be dehydrated? Is his water bottle working? If he hasn't improved by the morning then yes you'd better get an emergency vet appointment.
If he doesn't seem unwell he may be in a huge huff! But you say he's totally out of it which sounds like he maybe unwell.