The etymology of rega is in dispute. The root רגע has two meanings. The more familiar one means "to be at rest", and is found in such words as ragua רגוע- "relaxed" and margia מרגיע - "calming". A second meaning is "to move, set in motion, disturb" (as in Yeshaya 31:34). Klein presents two possibilities as to the connection between the two meanings. Either they are related, with both sharing a common root meaning "to return" (there is a cognate Arabic word with that sense), so the first meaning literally means "returned to rest after wanderings" and the second meaning focuses on the "movement" found in returning. The second theory, which Klein prefers, says the two roots are not related, and the latter is related to two other Hebrew roots also meaning "to disturb" - רגש and רגז.
Along these lines, Klein mentions two theories of the etymology of rega:
Probably derived from רגע (= to move), and literally meaning 'a twinkling (of the eye)'. For sense development, compare Latin momentum (=movement, motion; short time, moment) from movere (=to move).This phrase "twinkling (or wink) of the eye" is found in Hebrew as well, also with the meaning "instant": הרף עין heref ayin.
Some scholars also derive rega from רגע, but in the sense of Arabic raja'a (=he returned) and compare the phrase qabla 'an yartadda ilayka tarfuka 'in the twinkling of an eye, instantly' (literally: 'before your look returns to you')
As Hebrew progressed into its post-biblical phase, the original sense of both words was maintained in many usages, but with the growing field of science they each gained an additional meaning: a specific, measured, unit of time. A shaah was one twelfth of the time between sunrise and sunset (or sunset to sunrise), and is close to our modern sense of "hour". A rega was a small fraction of that time - according to the Talmud Yerushalmi (Berachot 1:1) it was either 1/56848 of a shaah (about 0.06 seconds), a heref ayin, the or the amount of time to say the word rega.
(Eliahu Netanel here quotes Rabbi Baruch Epstein in his book Baruch She'amar as saying that the expression "even one shaah" in the blessing "Asher Yatzar" can't be referring to the later meaning, 1/24 of the day, but must be the earlier sense of "instant".)
In the Middle Ages, the word dak דק replaced rega as the unit of time smaller than a shaah, with the meaning of "minute", one-sixtieth of an hour - again due to a need for more precise terms. The Hebrew adjective dak also means "thin, lean, small". Think of the dual meaning of "minute" in English - "small" and "1/60th of an hour". Klein gives the following etymology to dak as a unit of time:
Based on Arabic daqiqah (= minute) and influenced by Medieval Latin minuta, short for Latin pars minuta prima (literally: 'the first small part')
Around the same time, the Hebrew shniah שנייה came to mean the even smaller "second" (as in Latin and English - this is the second division of the hour, after the division into minutes). Rega returned to its earlier sense of "moment" (which, as in English, doesn't refer to a particular amount of time, although like rega once did), however until recent generations was still occasionally used for "minute" as well. (Ben Yehuda criticized this usage, while others, such as Avineri, supported it, and said rega was even a better term than daka for minute. Ben Yehuda won that battle.)
In modern Hebrew dak was replaced with daka דקה. This article claims that perhaps this was from the influence of the endings of the Arabic daqiqah, Latin minuta, and Hebrew shaah. The same article goes on to say that the male forms of minute - rega and dak - apparently had enough influence on spoken Hebrew that even today the common way of saying the time has the minutes in the masculine form - for example, 5:55 would be spoken חמשה לשש - chamisha l'shesh (five [minutes] to six) instead of חמש לשש chamesh l'shesh (which would be proper if the first number referred to female dakot דקות). Some people find the current usage improper or grating (for example in the book Rega Shel Ivrit) but the article quoted above, by the Hebrew Language Academy, says the practice is so well established that it's not worth fighting.
Shaah still maintains in modern Hebrew its early sense of "instant" particularly in phrases such as otah shaah אותה שעה - "at the same time" (which doesn't mean "within the same hour"). However, in general it refers to our familiar "hour" - sixty minutes.
And continuing this trend of scientific progress, in the modern period a word was needed for the instrument used to measure and display time - the clock. (Already in the Mishna, Kelim 12:4, we find a term for a sundial - אבן שעות even shaot). As was common in the Haskala period of Hebrew (which preceded modern Hebrew), longer compound phrases were used, such as moreh shaot מורה שעות. In 1885, Yechiel Michael Pines (and not Ben-Yehuda as some mistakenly claim) coined the term shaon שעון (following the general trend of preferring shorter, one word neologisms). And despite the opposition of some - either because they preferred to use existing Hebrew words (as mentioned by Klausner), or they thought shaon was too similar to שאון shaon meaning "noise, tumult" (as mentioned by Avineri) - shaon became the modern Hebrew word for "clock". Avshalom Kor has a nice video about the history of the word here - enjoy!