He could have been casing the house and broke in while they were at the Christmas Party that night and was hiding in a closet..possibly in JonBenet's bedroom...and wrote it while he waited for them to come home.
That is a very plausible post. How much time elapsed from the open house to the murder??