I think the main thing is a routine - so the lights tend to go out around the same time each night. Hamsters often wait till it's dark to come out and do their night time things, but their habits vary in that way. Ours won't come out if there's a light on, or will go back in his house if someone comes down in the night and turns the light on. They don't see well at the best of times, and are night time creatures mostly, sleeping during the day (hence needing a house that's dark inside for daytime sleeping).
So if you tend to have a light on a lot at night in that room, it could be good to keep it to certain times when necessary and have low light, like a lamp, rather than a big main light, and not too close to the cage. Or have a red bulb in the lamp! I think there was a discussion on here a couple of years ago about what kind of light least affected hamsters at night, and I'm sure it said blue light was better than red. I'll see if I can find it. Edit - I think it's red light is ok as hamsters can't see the colour red - although presumably it's still lighter than dark!
Is there another room you could have the hamster cage in? I'm a bit confused actually lol! If your bf works nights, presumably he's not in the house?
This is the discussion
LED color?
I think they do need dark at night mostly and have circadian rhythms due to the light cones in their eyes sending signals to the brain and something to do with melatonin levels. Red light would be pretty difficult to live by for the humans though.
Something similar is supposed to happen with humans though, after 11pm at night. If you go to sleep before 11pm it's ok, but if awake after 11pm Serotonin levels increase and make you feel awak again apparently.
Humans have to adapt to night shifts I guess, so maybe you need a routine the hammy can adapt to as well. It sounds like the easiest thing might be to have your hammy in a different room from your bf at night!
I find it quite amazing though, just how "hard wired" they seem to be in their habits - sleeping during the day and being awake at night - it's clearly something more than light levels. Just like they continue the habit of hoarding and foraging for food, even when it isn't necessary. It's like a little in built program for their survival.