Translation:It is recommended to sleep at least eight hours every night.
It depends on the context. Măcar means "at least" if you say "I needed at least one hour" - Aveam nevoie măcar de o oră but can mean only if you say "if only I had one hour" - Dacă aș fi avut măcar o oră. It is a bit difficult to explain to a non-native speaker, as it is used in certain phrases - about restrictions or in concessive sentences. By the way "Only" should be translated usually as "doar" or "numai".