First, don’t panic. It’s natural and everyone has had these moments. It’s not the fact that you have one; it’s how you deal with it.
From there, however, it seems to be a purely personal thing. Some people suggest taking a break, doing something else. For those of us who spend way too much time in solitude or sitting on our duffs as part of our art, maybe the answer is to get up and get moving. Go for a walk, play with the dog, socialize (and that means with actual people – not hanging out on a social media website), whatever. This gives your conscious brain a chance to take a break and focus on other things, which will allow your sub-conscious brain to muddle on the issue. You may find you have one of those eureka moments because of this. But even if you don’t, it is time well spent.
Others suggest the more mundane side of the art – practice the techniques. If you sing or play an instrument, this is when you do those boring drills that help maintain and broaden your skill. If you write, then just start writing; something, anything; just put pen to paper (or start typing) even if the words are just some favorite quotes or a bunch of nonsense. The goal here isn’t to aim high and create something beautiful, it is to keep in shape, and develop a habit.
The essence of both methods is the same: accept it and move on rather than dwell on it. Tides ebb and crest; weather goes through seasons; bodies need periods of activity and rest, even sleep. Your art will have the same cycles; learn how to recognize it and what works best for you.