Air conditioning during the night

I have been waking up with pains in my neck after a long night of sleep. I thought at first I was just sleeping weird. I work odd hours for my job. I work as the night guard of an office building. I watch over the building and let the workers in and out. It is not a bad job. It is very relaxing and I do crossword puzzles most of the time. The issue is that I have to be alert at like three in the morning. I then sleep during the daylight hours. My sleeping is very irregular and odd, which is what I thought was causing the pains. I then woke up in the middle of the night and realized that I was cold. I leave my AC on when I go to bed. Since I sleep during the day it gets really hot in my room. I turn on the cooling system and turn it off when I wake up. By the time I have woken up it is dark outside and the temperatures have dropped. I realized that my bedroom temperature just lowers while I am sleeping. Then my body gets cold and I think that I tense up when I am cold. I think the air conditioner is what is causing my neck and back pains. I think what I will do is set my system to turn on while I am sleeping. I then will have to set an alarm to wake up to turn off the unit. I only have to do this for a few days and then my smart thermostat will learn to turn off on its own.