If you have an event to go to I’d advise getting your spray tan done a couple of days beforehand to allow it to settle nicely into the skin, although having one done the day before or even on the day if it’s an express solution is equally fine.
A spray tan takes 6-10 hours to develop so if you don’t want to sleep with it while it’s developing I’d advise getting it done earlier in the day so you can shower before bed. Going to bed while it’s still developing though isn’t a problem and won’t affect the outcome. Some brands transfer onto sheets but will wash out.