He had always been an efficient cook. But he'd grown so bored after John married, that he began cooking intentionally complicated meals.
He became a gourmet detective. He would examine a dish (Penne all'arrabbiata from Angelo's) and deduce the seasonings, the method of preparation—even the suppliers of each ingredient. Perhaps it was better than solving crime, as he could improve on recipes (A hint of basil in the penne).
For years, cooking was almost completely satisfying.
The first time John sat at his table and exclaimed his approval of a (perfect!) lamb curry, Sherlock realized what had been missing.