YSK: Bugs are naturally attracted to light sources. To make a fly or another annoying bug leave your bedroom, try turning off all the lights in your room and turning on all the lights in another room like the kitchen or patio.
from /r/YouShouldKnow
YSK:虫子自然会被光源吸引。要想让苍蝇或其他恼人的虫子离开你的卧室,可以尝试关闭你房间的所有灯光,并打开另一个房间的所有灯光,如厨房或天井。