Concept:
One-word substitution questions test vocabulary by replacing a phrase or description with a single precise word.
A person who talks while sleeping is described by a specific term in English vocabulary.
Step 1: Understand the given description.
The phrase states:
\[
\text{A person who talks in their sleep}
\]
This refers to someone who unconsciously speaks while sleeping.
Step 2: Analyze Option (A).
\[
\text{Insomniac}
\]
means a person who suffers from insomnia or inability to sleep.
This does not fit the description.
Step 3: Analyze Option (B).
\[
\text{Somniloquist}
\]
comes from words related to sleep and speaking.
A somniloquist is a person who talks during sleep.
Therefore this exactly matches the given description.
Step 4: Analyze Option (C).
\[
\text{Philanthropist}
\]
means a person who loves humanity and helps others.
This is unrelated.
Step 5: Analyze Option (D).
\[
\text{Optimist}
\]
means a person who expects positive outcomes.
Again, this is unrelated.
Step 6: Choose the correct answer.
Hence,
\[
\boxed{\text{Somniloquist}}
\]
is the correct one-word substitution.