The term "Dutch wife" is listed as having several somewhat related meanings. Wiktionary describes it as meaning 1) a body-length pillow, 2) a wicker or bamboo tube that someone sleeps in (also called a bamboo wife) 3) a prostitute and 4) a sex doll, and Wikipedia also mentions it being 5) a hot water bottle. Meanwhile, this page claims that a Dutch wife is a real wife, merely an unpleasant one.

The origin of the English term "Dutch wife" is thought to be from the
Dutch colony of Indonesia where Dutch traders would spend long periods
away from their wives.

But I'm a bit skeptical. It seems to be more like one of those Dutch words

Since c.1600, Dutch (adj.) has been a "pejorative label pinned by
English speakers on almost anything they regard as inferior,
irregular, or contrary to 'normal' (i.e., their own) practice"
[Rawson]. E.g. Dutch treat (1887), Dutch uncle (1838), etc. --
probably exceeded in such usage only by Indian and Irish -- reflecting
first British commercial and military rivalry and later heavy German
immigration to U.S.

When did the term "Dutch wife" originate? Is it likely to have been a "Dutch word" (this isn't a real term, but apparently there's not really a term for putting a nationality in front of a word)? And what was the first meaning of the phrase?

OED thinks it's a “Dutch” word and derives from historical emnity between the English and Dutch. It seems to have a variety of meanings, and I'm not entirely sure about making love to a bolster (although I suppose it’s something to cuddle). It’s interesting that the Guardian quote attributes the same derisive use to the Japanese.

Dutch wife n. (see quots. and Special uses 2).

1891 J. S. Farmer Slang II. 349 Dutch-wife, a bolster.
1965 W. Young Eros Denied xxvii. 271 We call..a masturbation machine a Dutch husband or wife.
1966 ‘G. Black’ You want to die, Johnny? vi. 114 ‘What's this great long bolster for?..’ ‘Colonial invention. For the hated Imperialists. Known as a Dutch wife.’
1967 Guardian 19 May 9/6 He will liberate man from dependence on the opposite sex by constructing what seems to be known in Japan as a ‘Dutch Wife’; a kind of life-size mechanical doll with built-in electric heating and all the other refinements.

S2

Characteristic of or attributed to the Dutch; often with an opprobrious or derisive application, largely due to the rivalry and enmity between the English and Dutch in the 17th c.
Often with allusion to the drinking habits ascribed to the ‘Dutch’; also to the broad heavy figures attributed to the Netherlanders, or to their flat-bottomed vessels. Sometimes little more than = foreign, un-English.

I came across the term "Dutch wife" this morning in the Wikipedia article List of wasei-eigo ("wasei eigo" is English made up in Japan). I strongly suspected that it wasn't wasei eigo, so I had to work out how it originated! ("Sex doll loved by Dutchmen." - yeah right!)
–
Andrew GrimmApr 5 '13 at 11:17

Dutch wife: Any item or person that makes rest or sleep more pleasant or practical, often away from home. Can refer to pillows, instruments of pleasure, surrogate women, or vending machines which carry prophylactics or pleasure items.
Several similar references from Romania, Armenia, Italy, Early English Colonies, Japan(modern); similar to Голландська дружина (Ukrainian)