I can only give you my anecdote as evidence, but yes, I believe they nap when bored. In my experience, napping either looks like suspended animation or else they lie on the gravel. Some of them have a preferred "bed". I’ve even seen a fish who went to bed under the filter at 7pm every evening.
I have a goldfish who is 16 years old. The year before last, we lost his two tank mates (both female, aged about 10 and 12). He’s been "old" for a while and naps on the gravel a few times a day, but right after we lost his other tank mate, he started napping a lot more often. I got a couple of new fish (babies) and although I can say he looked pleased, his nap frequency dropped. He started looking a bit more interested in things. If the tank was in a room with more activity (it’s in the dining room), I might have left him on his own, but it looked like he was mourning, so we got him company. The tank is big enough.
Now the science. Check your water quality. Your local fish shop might do it for you or you can buy kits, but as a minimum, I’d check nitrates, ammonia and pH. Nitrates in particular, IIRC, can make fish sleepy. Ammonia will make the fish slimy or cause red streaks on the fins. Check your filter circulation, too - sometimes a change in currents can help. I’d recommend buying a real plant or two because eating it gives them some stimulation when you’re not there. They will eat it, though! If it’s all fine, consider another fish. But remember to check if the tank is big enough first. I think surface area counts more than volume.
Other than that, it might be worth considering how old the fish could be. Old ones nap. 3 years is maturity but for some fancy fish, 5 is elderly. My old one is a plain goldie, and he’s not a particularly clever fish.