A magnitude 5.8 earthquake struck off the eastern coast of Hokkaido early on Sunday morning local time, according to the U.S. Geological Survey.