The ideal time to go to bed is between 10:00 pm to 11:00 pm. The risk of a heart attack is greatest for those who go to bed after midnight.