This sounds like [John D. MacDonald][1]'s novel [*Wine of the Dreamers*][2] (aka *Planet of the Dreamers*), originally published (probably in a shorter form) in [*Startling Stories*, May 1950][3] which is available at the [Internet Archive][4]. Maybe one of [these covers][5] will ring a bell. Plot summary from [Wikipedia][6]:

> The book is set both on Earth (dealing with a top-secret military
> spaceflight project in an imagined 1975) and a far-away planet of
> humans able to influence Earth while they sleep, believing that the
> planet and all its inhabitants are simply part of their dreams that
> they can toy with. MacDonald described the book as "a symbolic novel
> of how when original purposes are forgotten, the uses of ritual can be
> destructive."

  [1]: https://en.wikipedia.org/wiki/John_D._MacDonald
  [2]: https://www.isfdb.org/cgi-bin/title.cgi?7582
  [3]: https://www.isfdb.org/cgi-bin/pl.cgi?60709+c
  [4]: https://archive.org/stream/Startling_Stories_v21n02_1950-05#page/n9/mode/2up
  [5]: https://www.isfdb.org/cgi-bin/titlecovers.cgi?7582
  [6]: https://en.wikipedia.org/wiki/Wine_of_the_Dreamers