Is it midsentence or mid-sentence? Onelook doesn't say.
Also, is it mid- to late 50s, mid-to-late 50s, or mid to late 50s?
I'd say mid- to late 50s because mid is a prefix that requires a hyphen. Hence, we put a space after the hyphen.
'mid-sentence' or 'midsentence' (or 'mid sentence')?
Style preferences regarding hyphenation of prefixes vary considerably from one style guide to another, so it's important to consult the one that governs your work (if any does).
The Oxford Guide to Style (2002), at 5.10.2, devotes an entire paragraph to mid-:
The prefix mid- is now considered to be an adjective in its own right in such combinations as mid shot, mid grey, mid range, and mid nineteenth century, though as a combining form it retains its hyphen in mid-air, mid-engined, mid-off, mid-Victorian, and other related forms.
Earlier in the same subsection the style guide lists mid-August as an example of the rule "Hyphenate prefixes and combining forms before a capitalized name, a numeral, or a date." Another example it gives there is pre-1990s.
But The Oxford Dictionary for Writers and Editors (2000)—which is bundled in a single volume with The Oxford Guide to Style as The Oxford Style Manual (2003)—muddies the waters further by including some closed-up forms of the prefix, including midbrain, midday, midfield, midnight, midrib, midship, midsummer, midway, midwife, and midwinter. Inexplicably, however, the dictionary also lists mid-life as the correct UK form:
mid-life (hyphen, one word in US)
Given the Style Manual's utter lack of clarity about how it reached its decisions in favor of (for example) mid range, mid-life, and midrib, I have no idea whether Oxford would endorse mid sentence, mid-sentence, or midsentence. That's a rather serious shortcoming in a style manual.
U.S. style guides are far less equivocal about mid- in combination with plain nouns. The Chicago Manual of Style, sixteenth edition (2010), for example, gives this baseline rule (at 7.85):
Compounds formed with prefixes are normally closed, whether they are nouns, verbs, adjectives, or adverbs.
It then goes on to list five exceptions to the baseline rule, none of which apply to the word midsentence.
Likewise, The Associated Press Stylebook (2002) declares a rule that makes its preference for midsentence unmistakable:
mid- No hyphen unless a capitalized word follows:
mid-America, mid-Atlantic, midsemester, midterm
But use a hyphen when mid- precedes a figure: mid-30s.
The two most widely followed U.S. style guides for mainstream publishing agree on midsentence. The one UK style guide that I checked offers no definitive guidance on whether to close up the word, hyphenate it, or treat it as two separate words.
'mid- to late 50s', 'mid-to-late 50s', or 'mid to late 50s'?
Oxford seems much clearer about how to handle this phrase than about how to handle mid-sentence,midsentence/mid sentence. Its view (note d earlier) that mid may be treated as "an adjective in its own right" and its reference to mid nineteenth century as an example of such use of mid indicate a strong preference for mid to late 50s.
AP doesn't address the question of how to handle remote prefixes (that is, prefixes separated by one or more words from the word they are logically attached to), but the fact that it specifies hyphenating number forms such as mid-30s and the absence of any acknowledgement of mid as a stand-alone adjective provide grounds for concluding that AP would endorse the form mid- to late 50s.
Chicago (at 7.85, part 4) explicitly endorses that form:
mid [examples of combined forms:] midthirties, a midcareer event, midcentury, but mid-July, the mid-1990s, the mid-twentieth century, mid-twentieth-century history
Chicago also addresses (at 7.84) the issue of using suspension hyphens to tie remote terms in hyphenated expressions to the omitted remainder of the expression:
7.84 Omission of part of a hyphenated expression. When the second part of a hyphenated expression is omitted, the hyphen is retained, followed by a space. [Examples omitted.]
Omission of the second part of a solid compound follows the same pattern. [Relevant example:] both over- and underfed cats
Even though Chicago considers overfed the correct spelling of that "solid compound," it advocates inserting a hyphen to indicate suspension of the compound in the phrase over- and underfed cats. Unmistakably, Chicago favors the form mid- to late 50s.
So there appears to be a split in preferences on opposite sides of the Atlantic over how to handle this phrase, with Oxford preferring mid to late 50s and Chicago and AP preferring mid- to late 50s.