Context Word: bed. 
Question: Although it was night time, PersonX stayed up while PersonY went to bed because _ just had some caffeine. 
Answer: PersonX
Although it was night time, PersonX stayed up while PersonY went to bed because _ just had some medicine with a sleep aid.