I found myself making one of these for a friend. It helps if you get a piece of cardboard and place it under the lid and trace around the outside of that. Cut along the line you drew to get a cardboard blank for sizing and fitting purposes.
I crocheted the top part the size of the cardboard. Then I crocheted several rounds on the outer edges. I folded back the last 2 rows and sewed that down to make a casing for the elastic. I just used elastic cording. The cardboard blank helped me get the elastic the right length. I knew if it would fit before it ever got put on a real toilet.
Since it was to be a pumpkin, I crochet a short tube for the stem. Then I crocheted a leaf and a vine. I used surface crochet to make the vertical lines that gave the pumpkin dimension (they aren't flat in real life?).
I know this is not an actual pattern. Just helpful information that I did not have when I started to make this. Since I never made one before I thought it would be nice if someone gave away ideas on how to make one on your own.