Yes, it is an older idiom meaning go to bed. Hit the sack is more commonly used (US)
2019年11月15日
2
0
0
Neither is super common, but they're both used. I wouldn't think anything odd of it if you said that you were going to hit the hay or hit the sack, as the other commenter mentioned. It's definitely very informal though.