You could still say 'Good night', even though it isn't night, if they are going to bed and ending their day. Technically it isn't correct, but they will know what you mean. Or you could say, 'Have a good sleep.'
If they are just going to sleep for an hour or two (taking a nap), you could say, 'Have a good nap.'