2 Answers
2

I can't say I've ever seen this practiced, but lighting candles in one's bedroom is certainly a traditional thing to do on Yom Kippur. The Mishna (Pesachim 4:4) rules that some places light Yom Kippur candles and some places don't. The explanation always given (see, for example, the commentary of Rav Ovadia of Bartenura) is that marital relations are forbidden on Yom Kippur: those who do not light candles do so so as not to see one's spouse and desire them while those who do light candles do so because since it will be light they will not think of having marital relations, something only done in darkness.

The Shulchan Aruch rules this way in OC 610:1 and the pseudo-Rama even comments that those who light Yom Kippur candles (which I think nowadays is everyone) should light them in the room s/he sleeps in. Although some explain why this is not the custom nowadays, the Mishna Berura (sk 4) suggests being careful to leave light in one's bedroom in addition to candles lit elsewhere in the house.

Presumably using the 24-hour candle for this is killing two birds with one stone.

This custom is mentioned in the Shulchan Aruch (OC 610:1). It is supposed to serve as a reminder to avoid marital relations on Yom Kippur. It is common to allow at least some light into the bedroom: see "The Laws of Lighting Candles for Yom Kippur" by R' Yosef Zimbal.