1570s, hickop, earlier hicket, hyckock, "a word meant to imitate the sound produced by the convulsion of the diaphragm" [Abram Smythe Palmer, "Folk-Etymology," London, 1882]. Compare French hoquet, Danish hikke, Persian hikuk, Hindi hichki, etc. Modern spelling first recorded 1788; An Old English word for it was ælfsogoða, so called because hiccups were thought to be caused by elves.
Others are reading
<a href="https://www.etymonline.com/word/hiccough">Etymology of hiccough by etymonline</a>
Harper, D. (n.d.). Etymology of hiccough. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/hiccough